I'd like to run a scroll function:
$("body").scrollTo({ top: "0px", left: "2200px" }, 800);
...without any manual (click) trigger, so basically it should run on load. is it possible?
I'd like to run a scroll function:
$("body").scrollTo({ top: "0px", left: "2200px" }, 800);
...without any manual (click) trigger, so basically it should run on load. is it possible?
Eh? Not quite sure what you're asking. You can programatically trigger a click without the user having to physically click his mouse by calling .trigger('click')
on the element in question.
If you just want to the scroll to occur immediately, wrap it in $(document).ready(function() { ... });