How do I know my selector is correct in jQuery
<p>I have the following piece of HTML code:</p>

<pre><code>&lt;div class="myclass" id ="class1"&gt;
  &lt;ol class="list"&gt;
     &lt;li id="li_1"&gt;
         &lt;input id="input_1" …&gt;
         &lt;acronym id="input_1" class="classabc"&gt;
      &lt;/li&gt;
      &lt;li id="li_2"&gt;
          &lt;input id="input_2" …&gt;
          &lt;acronym id="input_2" class="classabc"&gt;
      &lt;/li&gt;
        ....
      &lt;li id="li_n"&gt;
          &lt;input id="input_n" …&gt;
          &lt;acronym id="input_n" class="classabc"&gt;
      &lt;/li&gt;
   &lt;/ol&gt;
&lt;/div&gt;
</code></pre>

<p>Now I want to change the class of some acronym tags, I have the id of an acronym tag, so I tried this:</p>

<pre><code>$('acronym#'+id).removeClass('classabc');
$('acronym#'+id).addClass('newclass');
</code></pre>

<p>It didn't work so I tried:</p>

<pre><code>$('div.myclass ol acronym#'+id).removeClass('classabc');
$('div.myclass ol acronym#'+id).addClass('newclass');
</code></pre>

<p>But it still doesn't work.
I tried alert inside the code, the alert works. I am thinking my selector is not right. So I am asking is there anyway to get correct selector? Or how do I know my selector is correct?</p>
