toggleClass with jquery
<p>I need to swap the class in a span placed withing a link based on a condition whether the link has a particular class in it or not. Tried this but it doesn't seem to work. What am I missing?</p>

<pre><code>if ($("#myLink").hasClass("dis")) {
    $("#myLink").find("span").toggleClass("uico", "uicoGR");
} else {
    $("#myLink").find("span").toggleClass("uicoGR", "uico");
}

&lt;a href="#" id="myLink" class="dis"&gt;&lt;span class="uico"&gt;&lt;/span&gt;&lt;/a&gt;
</code></pre>
