wDrag - A drag&drop javascript library for nested lists ordering

Current Version: v2.0 alpha - April 16th 2006
Copyright (c) 2006 Cédric Savarese <pro @ 4213miles.com>
This software is licensed under the CC-GNU LGPL

Download

Important remark: This library is provided as-is. I put it together for a very specific need (the Form Builder) and did not have time to make it as versatile as I intended. It is NOT bug free (hence the alpha release).

 

Example:

You can drag&drop any item and folder in the list below.

Note that the drag&drop does not conflict with the links. The links will take you to the top of the page when clicked (not dragged). You may need to scroll the window down a bit to see that happening.

 

Documentation

More documentation may come later (time allowing). In the meantime your best chance is to look at the source of this page.

Here's a code sample:

<script type="text/javascript" src="whelpers.js"></script>
<script type="text/javascript" src="wdrag_2.0.js"></script>
<script type="text/javascript" >
	var wd = new wDrag();
	wd.create("top_ul_element_id", { onUpdate: someFunctionName } );
	
	function someFunctionName(topUlElement,movedElement) {	
		// the treeview was reordered.
	}
</script>

Note: At this time, only links (A tags) with a class of 'dragHandle' can be dragged.

 

Support & Community

wDrag is an open-source drag&drop javascript library specialized for nested lists sorting (a.k.a. treeview).