首页 > 其他 > 详细

脚本 折叠 各方向

时间:2016-04-22 16:37:21      阅读:213      评论:0      收藏:0      [点我收藏+]

$(this).find(".bag_tool").animate({ width: ‘toggle‘ }); //左折叠



<style type="text/css">
.slide {
position: relative;
height: 200;
lightyellow;
}
 
.slide .inner {
position: absolute;
left: 0;
bottom: 0;
height: 100;
lightblue;
width: 100%
}
</style>
$("#slideleft button").click(function(){//左滑动
var $lefty = $(this).next();
$lefty.animate({
left:parseInt($lefty.css(‘left‘),10)==0 ? -$lefty.outerWidth() : 0
});
});



$("#slidemarginleft button").click(function(){//右滑动
var $marginlefty = $(this).next();
$marginlefty.animate({
marginLeft:parseInt($marginlefty.css(‘marginLeft‘),10)==0 ? $marginlefty.outerWidth() : 0
});
});


脚本 折叠 各方向

原文:http://zhaoyingyatou.blog.51cto.com/7151735/1766750

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!