source:
main/waeup.kofa/trunk/layout/static/js/kofa-scrollto.js
@
13276
Last change on this file since 13276 was 11492, checked in by , 11 years ago | |
---|---|
File size: 365 bytes |
Line | |
---|---|
1 | /* After loading the page, softly scroll to the #kofa-scroll-target tag, |
2 | if it exists */ |
3 | $(document).ready(function (){ |
4 | var scroll_target = $('#kofa-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.