#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,846
    Rep Power
    172

    Cant access link # because header is position fixed!


    Hi;

    In this page, I want the page to jump up or down to the booking form when click on Book Now.

    But because I have position fixed for heading, it doesnt work properly. For example if you click on book now here, you see it skips part of the form.

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    51
    Rep Power
    36
    Take a look at the ScrollTo jQuery plug-in http://flesler.com/jquery/scrollTo/ you'll be able to set an element to scroll to plus there's an option to specify an offset which you should be able to use to offset the space used by your heading/search bar.
    Code:
    $.scrollTo( '#form_407', 0, {offset:+156} ); //add to the final position
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,846
    Rep Power
    172
    Originally Posted by Edge360
    Code:
    $.scrollTo( '#form_407', 0, {offset:+156} ); //add to the final position
    Hi;

    Working nice. Just not sure what you meant by "add to the final position".

    Anyways working.

    Thanks again
    Last edited by zxcvbnm; June 27th, 2013 at 05:56 PM.

IMN logo majestic logo threadwatch logo seochat tools logo