title: Find element's attribute value
body: <p>I have got the following code :</p>
  
  <pre><code>  &lt;ul&gt;
      &lt;li class="jstree-leaf" kids="0" range="5-7" name="mars" public_id="mars_05" ra_depth="5"&gt;
          &lt;a href="#"&gt;&lt;ins class="jstree-icon"&gt;&amp;nbsp;&lt;/ins&gt;mars&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="jstree-leaf" kids="0" range="8-10" name="pluto" public_id="pluto_8" ra_depth="5"&gt;
          &lt;a href="#"&gt;&lt;ins class="jstree-icon"&gt;&amp;nbsp;&lt;/ins&gt;pluto&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  </code></pre>
  
  <p>I need to get the <code>ra_depth</code> attribute value of a particular <code>&lt;li&gt;</code> by using it's <code>name</code> attribute value.</p>
  
  <p>I tried the code below but it's not working:</p>
  
  <pre><code>alert(li[name='"+myarray[0]+"'].attr("ra_depth"));
  </code></pre>
  
  <p><code>myarray[0]</code> contains the value "pluto".</p>
  
  <p>Is there anything I am missing?</p>