source:
main/waeup.ikoba/trunk/layout/static/js/ikoba-scrollto.js
@
17384
Last change on this file since 17384 was 11957, checked in by , 10 years ago | |
---|---|
File size: 367 bytes |
Line | |
---|---|
1 | /* After loading the page, softly scroll to the #ikoba-scroll-target tag, |
2 | if it exists */ |
3 | $(document).ready(function (){ |
4 | var scroll_target = $('#ikoba-scroll-target'); |
5 | if (scroll_target.length) { |
6 | $('html,body').animate( |
7 | { |
8 | scrollTop: scroll_target.offset().top |
9 | - $(window).height() + 2 * scroll_target.height() |
10 | }) |
11 | } |
12 | }); |
Note: See TracBrowser for help on using the repository browser.