zoukankan      html  css  js  c++  java
  • silentScroll() 滚屏

    jQuery.mobile.silentScroll( yPos )

    滚动到一个特定的Y坐标位置,没有触发涡旋的事件监听器

    yPos:Y坐标。类型:数字。默认值:0
    //滚屏到y 100px处
    $.mobile.silentScroll(100); 
    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>jQuery.mobile.silentScroll demo</title>
      <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css">
      <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
      <!-- The script below can be omitted -->
      <script src="/resources/turnOffPushState.js"></script>
      <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
    </head>
    <body>
     
    <div data-role="page">
     
      <div data-role="header">
        <h1>silentScroll() example</h1>
      </div>
      <div data-role="content">
        <a href="#" onclick="$.mobile.silentScroll(100)" data-role="button">Go down 100 pixels</a>
        <p> <br /><br />Here, we have some text so that we can have <br />
        some vertical space in order to demonstrate <br />
        the silentScroll() method.<br /><br /></p>    
        <a href="#" onclick="$.mobile.silentScroll(0)" data-role="button">Back to Top</a>
      </div>
      <div data-role="footer">
        <h4> </h4>
      </div>
     
    </div>
     
    </body>
    </html>
  • 相关阅读:
    JS中检测数据类型的方式
    DOM库
    原型应用(将数组去重写到数组的原型上)
    JS学习之原型和原型链模式
    JS学习之闭包、this关键字、预解释、作用域综合
    JS学习之作用域
    JS学习之预解释
    maven gradle 混合使用的问题
    libgdx 开发环境搭建
    maven 安装 jar
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/4872858.html
Copyright © 2011-2022 走看看