you can use shvetsgroup / jquery.multisortable command
but this will create a problem .. because js is for tags only
...
but set it up to use it, its very simple i will tell you how ????
download this .js first and use it in your program ...
Step 1. Open the js file ... now edit the following lines ...
$.fn.multiselectable.defaults = { click: function(event, elem) {}, mousedown: function(event, elem) {}, selectedClass: 'selected', items: 'li' };
above are lines from 107 to 112 ....
there you can see 'items:' li '
which uses the tag that you used to nest this image, as if you are using, or or anything you use, like this
$.fn.multiselectable.defaults = { click: function(event, elem) {}, mousedown: function(event, elem) {}, selectedClass: 'selected', items: 'div'
and from 249 to 254
selectedClass: 'selected', placeholder: 'placeholder', items: 'li' };
} (Jquery);
change the line "item: 'li'" with your tag like this
selectedClass: 'selected', placeholder: 'placeholder', items: 'div' // or anything else };
} (Jquery);
if you work with text fields inside these envelopes. You should also get rid of these lines.
// If no previous selection found, start selecting from first selected item. prev = prev.length ? prev : $(parent.find('.' + options.selectedClass)[0]).addClass('multiselectable-previous'); var prevIndex = prev.index();
after this line of comment ...
add a line code that looks for a text field or check box or any interaction element inside it ...
like this..
// If no previous selection found, start selecting from first selected item. item.children("input").focus(); // customize this code to get your element focus... prev = prev.length ? prev : $(parent.find('.' + options.selectedClass)[0]).addClass('multiselectable-previous'); var prevIndex = prev.index();
and also indicate the selected tags or elements ... use styles like this
div { margin: 2px 0; cursor: pointer; } div.selected { background-color: orange } div.child { margin-left: 20px; }
actually i used a div .. instead you can use any tag you want ...
Hope will help u .... if it is not ... read again .. and ask again ....
wishes