source: main/waeup.kofa/branches/uli-fix-zc-async/layout/static/js/kofa-scrollto.js

Last change on this file was 11492, checked in by uli, 11 years ago

Add a scroll-to script.

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.