Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The following blog of okcupid had this interesting feature that shows a "share this" window only when you reach the end of the post:

http://blog.okcupid.com/index.php/what-if-there-were-not-so-many-white-people/

How is it possible to do this?

Thanks

share|improve this question
    
Great question but nothing to do with WordPress. –  Chris_O Apr 28 '11 at 6:10
    
Well, I wish to do it with WP :) –  Tal Galili Apr 28 '11 at 14:10
add comment

1 Answer

up vote 0 down vote accepted

They've attached a function to the scroll event of the page, it looks at the scroll position of the document relative to its height to detect when you've reached the bottom, in which case they animate the flyout div.

jQuery has some easy methods for this: $(document).height();, $(document).scrollTop();

edit: these may help one two

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.