欧美国产日韩精品一区三区二区-中出视频免费在线观看-成人一区二区亚洲精品-h在线看免费视频网站

中山php|最優(yōu)網(wǎng)絡(luò)中山做網(wǎng)站 中山php建站

最優(yōu)良人

2011/08/25 at 14:33

JQ實現(xiàn)元素上下移動

jquery實現(xiàn)元素上下移動代碼
$('.ctl-prev').click(function(){

$('#ctl-ul li:last-child').clone(true).prependTo('#ctl-ul');

//clone(true)參數(shù)true是表示把元素所綁定的事件一起克隆,在副本還能夠監(jiān)聽到事件并且觸發(fā)動作
$('#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;
});

標(biāo)簽:
-