- 利用jQuery+jQuery UI实现了菜单左右滑动(显示与隐藏)的效果。
- 代码引用:
- Jquery-latest.js
- jquery.effects.core.js
- jquery.effects.slide.js
- jQuery.fn.extend({
slideRightShow:function(){
returnthis.each(function(){
$(this).show('slide',{direction:'right'},1000);
});
},
slideLeftHide:function(){
returnthis.each(function(){
$(this).hide('slide',{direction:'left'},1000);
});
},
slideRightHide:function(){
returnthis.each(function(){
$(this).hide('slide',{direction:'right'},1000);
});
},
slideLeftShow:function(){
returnthis.each(function(){
$(this).show('slide',{direction:'left'},1000);
});
}
}); - 引用地址:
- 孤舟苦渡:http://www.cnblogs.com/onlylonely/archive/2012/01/03/2311378.html
- Stackoverflow:http://stackoverflow.com/questions/521291/jquery-slide-left-and-show