I am trying to add and remove class in a divtag which couldnt do
<p>I wanna add class or alter the existing class name..but i couldnt do it.</p>

<pre><code>&lt;div id="vote2" style='.'"background:url(images/btn_active.gif)no-repeat"&gt;

$("#vote2").addClass("vtbtn");
</code></pre>

<p>And also i am trying to remove jte existing class name which i couldnt accomplish either.</p>

<pre><code>&lt;div id="vote2" class="vtbtn" style='.'"background:url(images/btn_active.gif)no-repeat"&gt;

$("#vote2").removeClass("vtbtn");
</code></pre>

<p>i got my css as</p>

<pre><code>.vtbtn{ cursor:pointer;}
</code></pre>

<p>But whenever i click on the button ,its not adding the class name..and its not removing existing class name as well</p>

<p>this is my full script</p>

<pre><code>   $("#vote2").click( function() {
        $(this).addClass("vtbtn");  //or $("vtbtn").....               
        $("#vote1").css("background","url(images/btn_inactive.gif) no-repeat 0 0")
                ;})
</code></pre>
