views:

437

answers:

1

There's placeholder on the page that is loaded asynchronously using jQuery load method. Page URL might have anchor and I want to scroll to the anchor after content is loaded. What is the best way to do that?

Problem is similar to this: http://forum.jquery.com/topic/goto-anchor-after-load But I don't like the solution. May be someone has and better ideas on this?

+2  A: 

How about scrolling with famous ScrollTo plugin?

Sarfraz
Yeah, I saw it, just don't want to depend on extra plugins for pretty simple stuff.
Vitaly
To be fair, I agree with Sarfraz and the solution is fine. Perhaps you can examine the source of the ScrollTo plugin and see if it inspires you. Either way, I'm in favor of his answer.
yonkeltron
Finally used this script :)
Vitaly