I have a JQuery sortable (1.7.1 can change if necessary) list like so:
- 1
-
This worked perfectly.
Follow the steps and include this:
$el.fadeOut(1000, function(){
$el.insertAfter($el.next());
$el.fadeIn(1000);
});
Like this (setting the id of the li tag of course):
jQuery(".templateMoveUp").on("click", function(){
$el = jQuery("#" + $(this).attr("id") + "_logTemplate");
$el.fadeOut(1000, function(){
$el.insertBefore($el.prev());
$el.fadeIn(1000);
});
});
jQuery(".templateMoveDown").on("click", function(){
$el = jQuery("#" + $(this).attr("id") + "_logTemplate");
$el.fadeOut(1000, function(){
$el.insertAfter($el.next());
$el.fadeIn(1000);
});
});