jquery实现元素上下移动代码
$('.ctl-prev').click(function(){
$('#ctl-ul li:last-child').clone(true).prependTo('#ctl-ul');
//clone(true)参数true是表示把元素所绑定的事件一起克隆,在副本还能够监听到事件并且触发动作
        $('#ctl-ul li:last-child').remove();
        return false;
    });
    $('.ctl-next').click(function(){
        $('#ctl-ul li:first-child').clone(true).appendTo('#ctl-ul');
        $('#ctl-ul li:first-child').remove();
        return false;
    });