Elad Benda
Elad Benda

Reputation: 36654

jsTree - what jQuery selectors to use?

I'm using jsTree.

1) I want to make the root and all it's children dropbale (jQuery UI)

What selector should I use?

2) each child looks like:

<a href="#" class=""><ins class="jstree-icon">&nbsp;</ins>Default</a>

what selector will choose all the anchors whose first child is <ins class="jstree-icon"> ?

I tried: $("a>ins") but it brought all the children themselves and not the parents anchors.

Upvotes: 0

Views: 277

Answers (1)

gen_Eric
gen_Eric

Reputation: 227240

Try this:

$('a:has(ins)')

This will find all a tags that contain an ins tag.

Upvotes: 1

Related Questions