Created
May 3, 2015 11:06
-
-
Save andyf-7/0b0d59645b0fc4be6a82 to your computer and use it in GitHub Desktop.
jquery div move left or right
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(e=="moveleft") | |
{ | |
var $current = $('#tsi'+shhetid).closest('li'); | |
var $previous = $current.prev('li'); | |
if($previous.length !== 0) | |
{ | |
$current.insertBefore($previous); | |
} | |
return false; | |
} | |
else if(e=="moveright") | |
{ | |
var $current =$('#tsi'+shhetid).closest('li'); | |
var $next = $current.next('li'); | |
if($next.length !== 0){ | |
$current.insertAfter($next); | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment