首页 > 其他 > 详细

老蔡写的代码,借鉴下!

时间:2016-09-10 19:11:49      阅读:203      评论:0      收藏:0      [点我收藏+]

var $info_b=$(‘div.info_b‘),$xiaoxi = $info_b.find(‘div.xt-xiaoxi‘);

function DSQ(){
$(‘#‘+footid).hide();

$xiaoxi.css({‘position‘:‘absolute‘,‘bottom‘:‘0‘})
.find(‘.xiaoxi‘).css({‘width‘:‘75%‘});
$info_b.css({‘position‘:‘absolute‘,‘bottom‘:‘0‘,‘borderTop‘:‘1px solid #efefef‘})
.find(‘.xiaoxi-btn‘).css({‘display‘:‘inline-block‘});
$(‘.info_t_ul‘).css({‘paddingBottom‘:‘20‘});
};

function UDSQ(){
$(‘#‘+footid).show();

$xiaoxi.css({‘bottom‘: ‘44‘,‘position‘:‘fixed‘})
.find(‘.xiaoxi‘).css({‘width‘:‘100%‘});
$info_b.css({‘bottom‘: ‘44‘,‘position‘:‘fixed‘,‘left‘:0,‘right‘:0})
.find(‘.xiaoxi-btn‘).css({‘display‘:‘none‘});
$(‘.info_t_ul‘).css({‘paddingBottom‘:‘90‘});
};

$xiaoxi.find(‘.xiaoxi‘).on(‘click‘,function(event){
event.stopPropagation();
event.preventDefault();
this.focus();
});

$xiaoxi.find(‘.xiaoxi‘).focus(
function(){
var scrollHeight=document.body.scrollHeight;
var speed=200;//滑动的速度
var OdocHeight=$(document).height()
$(‘body,html‘).animate({scrollTop:OdocHeight },speed);
setTimeout(DSQ,300);
});

$(document).on(‘click touchstart‘,‘.info_t‘,function(){
UDSQ();
$xiaoxi.find(‘.xiaoxi‘).blur();
});

老蔡写的代码,借鉴下!

原文:http://www.cnblogs.com/freddyhuang/p/5859987.html

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