So the context is this:
I have some favorite inputs with cities, when the values change, I need to find the identifier of the parent node 9 levels above this selected input, then split it, and then get the last part of the array by split.
I know that the identifier of the target node is in the format "someName_SomeNumber", for example, "node_1234".
I tried to do this using this function:
$("select[name*=id_city_]").change(function(){ alert($(this).parents().get(8).prop("id").split("_").last()); });
everything works fine if I execute "$ (this) .parents (). get (8)", but when I try to get a support id, it says prop is not a function.
early.
source share