Demo of enable disable methods for Dragging elements in JQuery UI

Drag me around













HTML

<div id="draggable" class='drg_box'>
  <p>Drag me around</p>
</div>
<br><br><br><br><br><br><br>
<button  id=b1>Enable</button><button  id=b2>Disable </button>  <br>
<div id=d1 style="position: absolute;"></div>

jquery

<script>
$(document).ready(function() {
		////////////////
$( "#draggable" ).draggable({
});
//////
$("#b1").click(function(){
$( ".drg_box" ).draggable( "enable");
$('#d1').html("Status : Enable ");
})
//////////////
//////
$("#b2").click(function(){
$( ".drg_box" ).draggable( "disable");
$('#d1').html("Status : Disable ");
})

/////
})
</script>