久艹网,亚洲一日韩欧美中文字幕2019,国产欧美日韩精品专区黑人,一区二区三区久久99

中山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)簽:
-