23 comments

[ 2.3 ms ] story [ 58.1 ms ] thread
v cool -- I've always wanted an easy way to do this!
I was looking at the jsfiddle and it doesn't work for me in FF16, is this Chrome only?
That's odd -- I just tried it in FF16 and it seemed to be working fine. It should definitely work cross-browser, but if you find a reason why it's not I'd love to hear it!
this is essentially built into css now, with position: sticky

http://updates.html5rocks.com/2012/08/Stick-your-landings-po...

My browser (chrome) doesn't support position: sticky so I guess the solution proposed is a lot better for compatibility.
oh for sure, and great job at it. I was just pointing out that this was more of a polyfill than a long term solution.
Actually I believe it is position: fixed.
From the article linked above:

"position: sticky is a new way to position elements and is conceptually similar to position: fixed. The difference is that an element with position: sticky behaves like position: relative within its parent, until a given offset threshold is met in the viewport."

Am I the only one what found the title of this post misleading? It's a plugin to make any dom element stick in the viewport ... the title made me think that it's a plugin that collects user behaviour?
Yes! That's exactly what I thought it was. Do you know of any script that does that?
Yea well it can be done with Google analytics but requires some real in-depth knowledge and lots of setting things up. Clicktale (http://www.clicktale.com/) is another one but I don't have any experience with it.

Maybe there are other tools that I don't know of though.

LOL, thought the same
1) Make the demo link big, first and easy to find. It's the most important part of the page.

2) Failed to work (using first gen iPad).

This is one design pattern that I personally find incredibly irritating. I have no idea why either, perhaps because a page no longer behaves like a page. All of a sudden something just sticks to the top of the browser, I just want to shake it off!
isn't this the same as the "affix" js in twitter bootstrap or am I missing something?