passing a javascript variable as id inside a jquery function
<pre><code>&lt;li id="sub:777" class="jstree-leaf"&gt;
    &lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;
    &lt;a class=""&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;Story B&lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>I need to change the class of the <code>&lt;ins&gt;</code> tags for a specific <code>&lt;li&gt;</code>:</p>

<pre><code> 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
</code></pre>

<p>I need to pass the <code>new_sub_id</code> variable in the code below, but it does not seem to work:</p>

<pre><code>$j("#"+new_sub_id + "ins:eq(1)").attr("class","jstree-icon2"); // set class to display new icon
</code></pre>

<p>Any suggestion are most welcome.</p>
