changing class of main <li> tag only
<p>I have the following unorderered list code which displays the list below:</p>

<pre><code>&lt;ul&gt;
  &lt;li name="EMI7428"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href="#"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;organ&lt;/a&gt;
  &lt;ul&gt;
  &lt;li name="EMI7436"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href="#"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;sub organ1&lt;/a&gt;
  &lt;ul&gt;
  &lt;li name="EMI8217"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href="#"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;sub organ2&lt;/a&gt;
  &lt;ul&gt; 
  &lt;li name="EMI8224"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href="#"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;sub organ3&lt;/a&gt;
  &lt;ul&gt;
  &lt;li name="EMI7428"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href="#"&gt;&lt;ins class="jstree-icon2"&gt;&amp;nbsp;&lt;/ins&gt;sub organ4&lt;/a&gt;
  &lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt; 
</code></pre>

<blockquote>
  <ul>   &nbsp;&nbsp;organ   <ul>   &nbsp;&nbsp;sub organ1   <ul>   &nbsp;&nbsp;sub organ2   <ul>    &nbsp;&nbsp;sub organ3   <ul>   &nbsp;&nbsp;sub organ4   </li></ul>  
  </li></ul>   </li></ul>   </li></ul>   </li> </ul>
</blockquote>

<p>When user clicks on a button, I would like to change the class of the <code>&lt;ins&gt;</code> tag for a particular <code>&lt;li&gt;</code> tag to be changed.</p>

<p>I am using the code below to change the class  of the <code>&lt;ins&gt;</code> tag.</p>

<pre><code>$j("li[name='"+emi_id+"'] ins").attr("class","jstree-icon2"); // set class to display new icon
</code></pre>

<p>It is working fine, except for the following error. if user selects the first <code>&lt;li&gt;</code> tag (EMI7428), all the <code>&lt;ins&gt;</code> tags inside that <code>&lt;li&gt;</code> tag (all the <code>&lt;ins&gt;</code> tags of the <code>&lt;ul&gt;</code> found inside that <code>&lt;li&gt;</code> tag) have their classes changed and this is not the behaviour i would like. 
I would like only the class of the ins tags belonging to an <code>&lt;li&gt;</code> tag with a particular name to be changed and i don't want the change to propagate to the inner <code>&lt;ul&gt;</code>.</p>

<p>I would really appreciate it if somebody could help me out with this.</p>
