jquery - Restricting droppable elements on div -


i'm creating , appending droppable div element :

    var drop = {                   drop: function(event, ui) {                       var add = $("#"+this.id);                       $('<div id='+counter+' "><div class="mycss">here</div></div>').droppable( drop ).appendto( "#mydivs");                       //debugger;                       counter++;                   }                 }; 

can update div allow divs of id or css allowed dropped ?

yes

.droppable(      drop: function(event, ui) {          var targetid = $(this).attr("id");          //your conditions check id/class of div .           if (targetid == '<your div id restrict>'){             return;          }     } ) 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -