I believe the over
and out
events trigger this option, though I have yet to use a droppable without a draggable to test this. You can use the accept
option to select your home-made draggable and the droppable should treat it accordingly.
$(".myDroppable")
.droppable({
hoverClass: "droppableStyle",
accept: ".homeMadeDraggable"
});
Without looking at your code though its hard to tell what exactly will happen. Have a look at the source code for droppable, in conjunction with reading the api, it should clarify what is going on beneath the surface and whether or not it will work in your case.
_over: function(event) {
var draggable = $.ui.ddmanager.current;
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
this._trigger('over', event, this.ui(draggable));
}
},
_out: function(event) {
var draggable = $.ui.ddmanager.current;
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
this._trigger('out', event, this.ui(draggable));
}
},