zoukankan      html  css  js  c++  java
  • 老蔡写的代码,借鉴下!

    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();
    });

    作者:freddyhuang
    出处:https://www.cnblogs.com/freddyhuang
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    mysql优化——语句优化小技巧
    mysql优化——索引与索引优化
    Mysql存储引擎
    Mysql优化技术
    数据库设计——三范式
    java多线程(二)——用到的设计模式
    java多线程(一)
    ubuntu下如何查看用户登录及用户操作相关信息
    hdu 2546
    hdu 2955
  • 原文地址:https://www.cnblogs.com/freddyhuang/p/5859987.html
Copyright © 2011-2022 走看看