Demo of enable and disable method of Droppable elements in JQuery UI

Drag me to my destination

Dropp here



HTML

<div class='row'> <div class='col-md-6'> 
<div id="draggable" class='drg_box'>
  <p>Drag me to my destination</p>
</div>
</div><div class='col-md-2'>  
<div id="droppable" class='drop_box'>
  <p>Dropp here</p>
</div>
</div></div>


<div id=d1></div>
<br><div class='radio-inline'>
  <label><input type='radio' name='r1' id='r1' value='enable' checked> enable</label>
</div>

<div class='radio-inline'>
  <label><input type='radio' name='r1' id='r2' value='disable' >disable</label>
</div>

jquery

<script>
$(document).ready(function() {
////////////////
$( function() {
    $( "#draggable" ).draggable();
  });
///////////
$( "#droppable" ).droppable({
      drop: function( event, ui ) {
        $( this )
            .find( "p" )
            .html( "Dropped!" );
      }
    });
///////////////
$("input:radio[name=r1]").click(function() {
var sel=$(this).val()
$( "#droppable" ).droppable( sel );
//var status_used = $( "#droppable" ).droppable( "option", "disabled" );
//$('#d1').html( " <b>Status of option   : disabled </b>: " + status_used );
})
///////////////////////
})
</script>