W3cubDocs

/jQuery Mobile

jQuery.mobile.silentScroll()

jQuery.mobile.silentScroll( yPos )Returns: jQuery

Description: Scroll to a particular Y position without triggering scroll event listeners.

Scroll to a particular Y position without triggering scroll event listeners.

Example:

scroll to Y 100px

<!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="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
  <script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
 
<div data-role="page">
  <div data-role="header">
    <h1>silentScroll() example</h1>
  </div>
  <div role="main" class="ui-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>

Demo:

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquerymobile.com/jQuery.mobile.silentScroll