views:

26

answers:

1

I use to jquery's ajax function to update a div on my page. Everything works fine, except my page is scrolled up.

I need somehow return to the updated div position. Any suggestions ?

+3  A: 

Your page shouldn't be scrolled up when you update a DIV.

Are you sure you're not using a link with href='#'? Because that will scroll you to the top of the page. In that case, make sure you return false; in the onclick part of the link.

Pekka
Yes, you're right there is # in the url. I'm curious where it comes from..
It's used to be able to click a link without changing the page. '#' points to the page top, though. Just `return false` in the onclick function and it should go away.
Pekka
perfect!! works like a charm now! Thank you