We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a23e104 commit 69583d1Copy full SHA for 69583d1
js/jquery.mobile.core.js
@@ -94,7 +94,10 @@
94
},
95
96
// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
97
- silentScroll: function( ypos ) {
+ silentScroll: function( ypos, elem ) {
98
+
99
+ var elem = elem && elem[ 0 ] || window;
100
101
if ( $.type( ypos ) !== "number" ) {
102
ypos = $.mobile.defaultHomeScroll;
103
}
@@ -103,7 +106,7 @@
106
$.event.special.scrollstart.enabled = false;
104
107
105
108
setTimeout(function() {
- window.scrollTo( 0, ypos );
109
+ elem.scrollTo( 0, ypos );
110
$( document ).trigger( "silentscroll", { x: 0, y: ypos });
111
}, 20 );
112
0 commit comments