How to set detect with draggable function?
<p>How to set detect with draggable function, When check the box the draggble fucntion still not work.</p>

<p><a href="http://jsfiddle.net/KPnRc/" rel="nofollow">http://jsfiddle.net/KPnRc/</a></p>

<p>HTML</p>

<pre><code>&lt;div class="drag" style="width:100px; height:100px; background:blue;"&gt;&lt;/div&gt;
Lock:&lt;input name="lock" id="lock" type="checkbox" value="0" /&gt;
</code></pre>

<p>JS </p>

<pre><code>if($('#lock').is(':checked') == true){

    $(".drag").draggable();

}
</code></pre>
