0

I have an absolute DIV with a large top css value. It begins as a hidden DIV and is revealed by slideToggle (jquery) when a button is pressed. This is fine for divs at the top of the page.

If there is a button off the bottom of the window, and needs to be scrolled down to - when it is clicked the hidden DIV appears beside the button because of its large top value - 400px or bigger. However the window goes back to top of page, and you have to scroll back down to view the content.

Can the window be stopped from jumping to top, and have the revealed DIV in the same position, yet dont have to scroll to see it?

Jon
  • 6,437
  • 8
  • 43
  • 63

1 Answers1

0

I think the question you asked and the answer you want is very similar to this:

How do I stop a web page from scrolling to the top when a link is clicked that triggers JavaScript?

Community
  • 1
  • 1
BumbleB2na
  • 10,723
  • 6
  • 28
  • 30
  • I don't think so, because he says it's a button that triggers it, and buttons usually don't behave that way. Maybe he meant an a href link – Some Guy Sep 15 '11 at 16:24
  • I saw a similar answer that didnt work, but I was able to integrate that code and it works - thanks. It didnt come up on my searches. The button is a jquery link so its compatible – Jon Sep 15 '11 at 17:41