Show HN: jQuery.pin – a plugin for making stuff stick
webpop.github.com
Show HN: jQuery.pin – a plugin for making stuff stick
1–10 of 38 posts
Re: Show HN: jQuery.pin – a plugin for making stuff stick
#2Re: Show HN: jQuery.pin – a plugin for making stuff stick
#3Also, what is with this new fashion of declaring functions as anonymous methods?
var recalculateLimits = function () {
/* snip */
};
var update = function () { recalculateLimits(); onScroll(); };
Have I missed a memo?EDIT: I forgot to say apart from my moaning, does the job, good code, good job! And it's only jerky when you use the scroll button on a mouse.
Re: Show HN: jQuery.pin – a plugin for making stuff stick
#4Could do with some smoothing and polishing. Jerks all over the place. Also, what is with this new fashion of declaring functions as anonymous methods? var recalculateLimits = function () { /* snip */ }; var update = function () { recalculateLimits(); onScroll(); }; Have I missed a memo? EDIT: I forgot to say apart from my moaning, does the job, good code, good job! And it's only jerky when you use the scroll button o…
Re: Show HN: jQuery.pin – a plugin for making stuff stick
#5How does this compare to say Bootstrap's affix plugin? I see that it supports a min-width property, but personally I'd rather deal with this myself via media queries (matchMedia API in JS) than have a limited option via the plugin.
We first developed the plugin for the Webpop gallery page (http://www.webpop.com/gallery) to make the description next to each screenshot stick to the top while you were viewing that gallery entry.
Later we also used it for the pinned navigation in our documentation section to make sure it didn't stay fixed and overlapped the footer once you scroll down to the bottom of the page. As far as I know Bootstrap's affix doesn't really help you there.
Re: Show HN: jQuery.pin – a plugin for making stuff stick
#6Re: Show HN: jQuery.pin – a plugin for making stuff stick
#7Could do with some smoothing and polishing. Jerks all over the place. Also, what is with this new fashion of declaring functions as anonymous methods? var recalculateLimits = function () { /* snip */ }; var update = function () { recalculateLimits(); onScroll(); }; Have I missed a memo? EDIT: I forgot to say apart from my moaning, does the job, good code, good job! And it's only jerky when you use the scroll button o…
This [0] is the only difference I am aware of. But I would love to hear someone talk about performance differences (if any). [0]: http://stackoverflow.com/a/336868/712889
I just don't get what it adds to your code apart from hiding simple function definitions in the visual trappings of a static helper object or closure. Javascript is already homogeneous enough without making it visually even more.
Re: Show HN: jQuery.pin – a plugin for making stuff stick
#8[deleted]