jquery droppable accept .valid .not valid code example
Example: jquery droppable allow what can be dropped
$(".droppable").droppable({
accept: function(d) {
if(d.hasClass("foo")||(d.attr("id")=="bar")){
return true;
}
}
});