Toby
Toby

Reputation: 55

100% height slideToggle

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!

Upvotes: 0

Views: 457

Answers (1)

SeanCannon
SeanCannon

Reputation: 77986

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

Upvotes: 1

Related Questions