Can anyone tell me how I can write a function in accept condition and then how does it finds out that what to accept and what not to accept. For example, I want to accept
Instead of using a class as accept, you can just use a function like and return true if it matches your criteria
$('#mydroppable').droppable( { accept: function() { return true; }, drop: function () { alert("Dropped!"); } });