jQuery draggable + toggleClass problem
<p>the problem here is that the toggleClass position top:0px; left:0px will not trigger.. only the width and height and background-color will activate.. it will work if i will not drag the div(draggable).. if i start to drag the element, the toggled class positioning will not effect.. i dont know if there's such a function in jquery to help this..</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script type="text/javascript" src="jquery-1.4.2.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.core.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.widget.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.mouse.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.resizable.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.draggable.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(document).ready(function(){
            $("#x").draggable().dblclick(function(){
                $(this).toggleClass("hi");
            });
        });
    &lt;/script&gt;        
    &lt;style&gt;
        .hello {
            background:red;
            width:200px;
            height:200px;
            position:relative;
            top:100px;
            left:100px;
        }

        .hi {
            background:yellow;
            position:relative;
            width:300px;
            height:300px;
            top:0px;
            left:0px;
        }
    &lt;/style&gt;
&lt;/head&gt; 
&lt;body&gt;
    &lt;div id="x" class="hello"&gt;

    &lt;/div&gt;    
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
