I want to realize moving elements between tabs using jquery ui. If I want drop element to another tab - droppable block (.elements) doesn't catch hover event (outline doesn't want to apply), but dropping works correctly.
$( "#tabs" ).tabs();
$('.elements').children().draggable({
appendTo: 'body',
opacity: 0.9,
helper: "clone",
zIndex: 1000,
cursorAt: { left: 50, top: 20 },
});
// drop into needle element
$('.elements').droppable({
accept: '.element',
tolerance: 'pointer',
activeClass: "can-drop",
hoverClass: "drop-here",
drop: function( event, ui ) {
alert('Drop');
}
});
// drop
$('.ui-tabs-nav').children().droppable({
accept: '.element',
tolerance: 'pointer',
over: function( event, ui ) {
$("#tabs").tabs("option", "active", 1);
}
})
You can see my example on jsfiddle.
Can someone help me? How can I fix it?
Thanks!