Javascript Library.
Commands 0 |
---|
Page/Element scroll.
_z.scrollTo(where);
Returns: _z(where) or _z(window) Object
This method is a shortcut for _z(window).scrollTo(where).
_z(selector).scrollTo(where);
Returns: Object _z(selector)
<textarea class="textarea">
line 1
line 2
line 3
line 4
</textarea>
<input type="text" id="text" value="Scroll to here">
<script>
// scroll textarea to 10px
_z(".textarea").scrollTo(10);
// scroll page to text input
_z.scrollTo("#text");
// scroll page to textarea
_z.scrollTo( _z(".textarea") );
</script>