0

I'm trying to create a simple slideToggle effect using jQuery, so that a user can click a link in the footer and a box slides up full screen.

This works pretty resiliently when there is a small amount of content - see this link:

http://bringontheweb.ca/less-content/

It begins to fail however with larger content in the main body, AND when the user has scrolled down the page - see this link:

http://bringontheweb.ca/more-content/

I understand that this is because it begins the slideToggle where the bottom of the page was, but I'm no sure how to check this, or prevent it with some jQuery magic.

Any help greatly appreciated!

Toby
  • 45
  • 5
  • http://stackoverflow.com/questions/1144805/how-do-i-scroll-to-the-top-of-the-page-with-jquery – Malkus Jan 23 '13 at 17:41

1 Answers1

1

Give .about and .contact position : fixed; instead of position : absolute;

AlienWebguy
  • 76,997
  • 17
  • 122
  • 145
  • Thanks for the response - I have tried several things in CSS, like using position: fixed; or altering the method of controlling the height, but they all lead to some kind of problem - either the slideToggle() not working, or not being able to scroll the right element at the right time. – Toby Jan 23 '13 at 18:34
  • I applied that CSS fix in your site through Chrome and it worked fine for me. – AlienWebguy Jan 23 '13 at 18:52