I want to rearrange menuitems by drag and drop in my firefox addon like the bookmarks in the Bookmarks menu. Specifically, I want the blue insertion marker to appear while dragging a menuitem over valid places. Can someone show me how to do this or tell me where the relevant code for bookmarks is located?
This question is related to
javascript
firefox
drag-and-drop
firefox-addon
xul
jQuery UI draggable and droppable are the two plugins I would use to achieve this effect. As for the insertion marker, I would investigate modifying the div
(or container) element that was about to have content dropped into it. It should be possible to modify the border in some way or add a JavaScript/jQuery listener that listens for the hover (element about to be dropped) event and modifies the border or adds an image of the insertion marker in the right place.
Source: Stackoverflow.com