News for hackers. Stuff that matters.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by risratorn on Wednesday November 07, 2012 @02:38AM (#4752617)
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?
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by joshuamerrill on Wednesday November 07, 2012 @03:08AM (#4752682)
Yes! That's exactly what I thought it was. Do you know of any script that does that?
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by peteretep on Wednesday November 07, 2012 @03:38AM (#4752728)
I wrote one circa 2003, and there's an article about it here:

http://www.drdobbs.com/web-development/mouse-tracking-with-j...

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by risratorn on Wednesday November 07, 2012 @03:42AM (#4752738)
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.

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by polyfractal on Wednesday November 07, 2012 @07:51AM (#4753204)
CrazyEgg (http://crazyegg.com) and Inspectlet (http://inspectlet.com) do similar things. Mouse/click tracking, watching users as they move through your site, etc.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by fox91 on Wednesday November 07, 2012 @07:36AM (#4753168)
LOL, thought the same
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by MichaelApproved on Wednesday November 07, 2012 @04:02AM (#4752776)
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).

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by cleverjake on Wednesday November 07, 2012 @01:34AM (#4752481)
this is essentially built into css now, with position: sticky

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

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by pestaa on Wednesday November 07, 2012 @04:27AM (#4752811)
Actually I believe it is position: fixed.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by michalstanko on Wednesday November 07, 2012 @05:02AM (#4752871)
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."

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by rxooo on Wednesday November 07, 2012 @02:45AM (#4752628)
My browser (chrome) doesn't support position: sticky so I guess the solution proposed is a lot better for compatibility.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by cleverjake on Wednesday November 07, 2012 @09:10AM (#4753411)
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.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by nedwin on Wednesday November 07, 2012 @01:57AM (#4752530)
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/
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by jvermasheina on Thursday November 08, 2012 @07:09AM (#4757487)
I like the idea. I'd like to do something like that but with responsive design? Any ideas?
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by matb33 on Wednesday November 07, 2012 @08:37AM (#4753313)
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
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by mattwiller on Wednesday November 07, 2012 @06:27PM (#4755752)
Nice! The stacking capability is definitely something I'd thought about adding in a future version.
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by callmevlad on Wednesday November 07, 2012 @01:22AM (#4752442)
Great work! Looks very similar to the more mature jQuery Waypoints library [1].

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

Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by riffraff on Wednesday November 07, 2012 @05:11AM (#4752893)
isn't this the same as the "affix" js in twitter bootstrap or am I missing something?
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by Bjoern on Wednesday November 07, 2012 @01:10AM (#4752411)
I was looking at the jsfiddle and it doesn't work for me in FF16, is this Chrome only?
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by mattwiller on Wednesday November 07, 2012 @01:37AM (#4752491)
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!
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by mattmanser on Wednesday November 07, 2012 @04:57AM (#4752862)
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!
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by shivalry on Wednesday November 07, 2012 @12:59AM (#4752379)
v cool -- I've always wanted an easy way to do this!
Re:Show HN: Stalker, a jQuery Plugin That Follows Users on a... by techunicorn on Wednesday November 07, 2012 @01:26AM (#4752455)
Sweet!