<li id="sub:777" class="jstree-leaf">
<ins class="jstree-icon2"> </ins>
<a class=""><ins class="jstree-icon2"> </ins>Story B</a>
</li>
I need to change the class of the <ins> tags for a specific <li>:
var original_sub_id = $j(element).attr('id'); e.g sub:777
var new_sub_id = original_sub_id.split(":");
new_sub_id = new_sub_id.join("\\\\:"); e.g sub\\:777
I need to pass the new_sub_id variable in the code below, but it does not seem to work:
$j("#"+new_sub_id + "ins:eq(1)").attr("class","jstree-icon2"); // set class to display new icon
Any suggestion are most welcome.
new_sub_idand "ins:eq(1)"