I'm trying to make the browser scroll horizontally to a specific position when the page loads. It works in FF and IE, but not Chrome.
$(document).ready(function () {
$("html").scrollLeft(100);
});
Any ideas?
My larger goal is to have the browser center the horizontal scrollbar. Again, I have it all working in FF and IE, but no Chrome.
All my other methods are working fine in Chrome. I'm using the following methods to find the amount of pixels to scroll so I can center it, and they all work right, but when it comes to try and use "scrollLeft" it does nothing.
$(document).width()
screen.width)
$(window).width()
maybe you can try
Please use
Or