jQuery UI Widgets › Forums › Plugins › Validator, Drag & Drop, Sortable › Change css on target area of drop
Tagged: angular dragdrop, angular2 dragdrop, bootstrap dragdrop, hover style, javascript dragdrop, jquery dragdrop, jqwidgets dragdrop, jqxdragdrop
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 8 years, 2 months ago.
In jquery UI I would use this property
classes: { “ui-droppable-hover”: “configletSpacerHover” },
how can I do the same with jqxDragDrop
I tried:
onDropTargetEnter: function(event) { $(event.context).toggleClass(“configletSpacerHover”); }, onDropTargetLeave: function(event) { $(event.context).toggleClass(“configletSpacerHover”); },
but it keeps the change there when you stop hovering over the target area. How can I apply a style to the target area.
Hello Rhys,
You could use different events to get it – as dropTargetEnter, dropTargetLeave or dragEnd. Please, take a look at this example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdragdrop/defaultfunctionality.htm?light (focus on the events, there is change of the border of the container)
dropTargetEnter
dropTargetLeave
dragEnd
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
You must be logged in to reply to this topic.