I have a jQuery object representing a DIV:
$rel = $('#rel_'+rel.id);
There is a BUTTON in this DIV with my custom "rid" attribute set to rel.id
I need to select this button, it works as follows:
$("[rid='"+rel.id+"']").html();
But I think this is not the fastest solution, because for this you need to parse the entire DOM, and since I know that the button is always inside the DIV, I could avoid this.
I tried it with the following code:
$rel.children("[rid='"+rel.id+"']").html();
but it didn’t work.
Thanks for any help.
source share