jQuery move to anchor location on page load

Description

You can do this using jQuery’s .scrollTop() and .offset() method

Check out my sample and this jsFiddle Demonstration

Sample

$(function() {
    $(document).scrollTop( $("#header").offset().top );  
});

More Information

  • jsFiddle Demonstration
  • jQuery.scrollTop()
  • jQuery.offset()

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)