monkeytribe
12-07-2007, 03:14 PM
1) Script Title:
Dynamic Ajax Content
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
Great wee script, but i am having problems getting each page content to load at the top of the div if the scroll bar has been scrolled down...
To be more concise, the scroll state of the container is being preserved when new content is loaded, but i don't want the scroll state to be preserved. I want the content to be loaded at the top of the div.
see the problem in action here:
http://www.monkeytribe.net/index2.php
works fine until you scroll down; then the scroll position is preserved for the next content loaded. How to reset the scrollTop?
i have tried the fix explained here:
http://www.dynamicdrive.com/forums/archive/index.php/t-11508.html
but with no luck, the code suggested is still on the "discog" link in the footer, but seems to have no effect...
i have also experimented with good old fashioned #anchor hrefs, but the javascript does not pass the "#anchor" in "xxx.php#anchor" as discussed here:
http://www.dynamicdrive.com/forums/showthread.php?t=20830
any ideas or fixes will be greatly appreciated!
Dynamic Ajax Content
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
Great wee script, but i am having problems getting each page content to load at the top of the div if the scroll bar has been scrolled down...
To be more concise, the scroll state of the container is being preserved when new content is loaded, but i don't want the scroll state to be preserved. I want the content to be loaded at the top of the div.
see the problem in action here:
http://www.monkeytribe.net/index2.php
works fine until you scroll down; then the scroll position is preserved for the next content loaded. How to reset the scrollTop?
i have tried the fix explained here:
http://www.dynamicdrive.com/forums/archive/index.php/t-11508.html
but with no luck, the code suggested is still on the "discog" link in the footer, but seems to have no effect...
i have also experimented with good old fashioned #anchor hrefs, but the javascript does not pass the "#anchor" in "xxx.php#anchor" as discussed here:
http://www.dynamicdrive.com/forums/showthread.php?t=20830
any ideas or fixes will be greatly appreciated!