1

Im not sure I can describe this well. I want to put an element to the HTML content which will automatic ask the browser to scroll there vertically, when its loaded. Like an anchor. So:

| visible area |
| content html |
| content html |        our monitor
| content html |
| content html |
----------------
|
|
| * here comes the HTML element which will ask the browser to scroll here
|
|
scunliffe
  • 57,883
  • 24
  • 118
  • 156
John Smith
  • 6,367
  • 12
  • 54
  • 106

2 Answers2

0
$(document).ready(function()
{
     $("html,body").animate({scrollTop: 200}, 1000);
}

not tested so let me know if it wont work

himanshu
  • 1,704
  • 1
  • 9
  • 12
0
$(document).ready(function(){
    var scrolldiv = $('#content');

    $('html, body').animate({
        scrollTop: $(scrolldiv).offset().top
    }, 1000);
});

scrolldiv will be the your element that wraps the content html;

specialone
  • 130
  • 8