How to set detect with draggable function, When check the box the draggable function still not work.
HTML
<div class="drag" style="width:100px; height:100px; background:blue;"></div>
Lock:<input name="lock" id="lock" type="checkbox" value="0" />
JS
if($('#lock').is(':checked') == true){
$(".drag").draggable();
}