0

I've implemented a simple jQuery UI draggable:-

 $(".widget").draggable({
                    handle: ".widget-header",
                    grid: [ 20, 20 ] 
    });

The draggable item is simply a div with a header class that I'm using as a handle (like a dialog).

What I'm trying to do is get it so that as I drag the item along, a faint dotted or dashed box can appear behind the div to show where it will be dropped on the grid'. I've looked to see if there is anything available under 'droppable' but I'm coming unstuck.

Mat Richardson
  • 3,576
  • 4
  • 31
  • 56
  • 1
    hoverClass on droppable wouldnt be a solution for you? http://stackoverflow.com/questions/9879414/how-do-i-highlight-a-droppable-area-on-hover-using-jquery-ui-draggable – trainoasis Jan 07 '16 at 10:44
  • Unfortunately not. I don't want a visible grid or any items displaying when the draggable is stationary. I'd just like the nearest grid area it can snap to to be highlighted whilst dragging. Hope that makes sense. – Mat Richardson Jan 07 '16 at 10:58
  • I think that should work via hoverClass - can you create a jsFiddle with your exact problem and perhaps I can make it work? – trainoasis Jan 07 '16 at 11:22

0 Answers0