

Show HN: Stalker, a jQuery Plugin That Follows Users on a Page - mattwiller
http://tech.blog.box.com/2012/11/developing-the-stalker-header/

======
risratorn
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?

~~~
joshuamerrill
Yes! That's exactly what I thought it was. Do you know of any script that does
that?

~~~
risratorn
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.

~~~
polyfractal
CrazyEgg (<http://crazyegg.com>) and Inspectlet (<http://inspectlet.com>) do
similar things. Mouse/click tracking, watching users as they move through your
site, etc.

------
MichaelApproved
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).

------
cleverjake
this is essentially built into css now, with position: sticky

[http://updates.html5rocks.com/2012/08/Stick-your-landings-
po...](http://updates.html5rocks.com/2012/08/Stick-your-landings-position-
sticky-lands-in-WebKit)

~~~
pestaa
Actually I believe it is position: fixed.

~~~
michalstanko
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."

------
nedwin
Nice. We did this with a nice little call to action button that "snaps" to the
header as you scroll past: <http://blog.tweaky.com/how-to-make-a-sticky-
button/>

~~~
jvermasheina
I like the idea. I'd like to do something like that but with responsive
design? Any ideas?

------
matb33
I wrote something similar, but with the added capability of having elements
stack against each other as well: <https://github.com/matb33/jquery-vertical-
stack>

~~~
mattwiller
Nice! The stacking capability is definitely something I'd thought about adding
in a future version.

------
callmevlad
Great work! Looks very similar to the more mature jQuery Waypoints library
[1].

[1] <http://imakewebthings.com/jquery-waypoints/sticky-elements/>

------
riffraff
isn't this the same as the "affix" js in twitter bootstrap or am I missing
something?

------
Bjoern
I was looking at the jsfiddle and it doesn't work for me in FF16, is this
Chrome only?

~~~
mattwiller
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!

------
mattmanser
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!

------
shivalry
v cool -- I've always wanted an easy way to do this!

------
techunicorn
Sweet!

