HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
WickyNilliams
headroom.js
JavaScript2014–2014
WickyNilliams / headroom.js

headroom.js

Give your pages some headroom. Hide your header until you need it

2Distinct people
3Mentions
0Explicit recommenders
10.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Give your pages some headroom. Hide your header until you need it

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2014-01-30 23:48:18 UTC to 2014-06-03 18:40:33 UTC. Weeks start Monday, UTC.

012014-01-27 00:00:00 UTC to 2014-02-03 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJan 272014-02-03 00:00:00 UTC to 2014-02-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-10 00:00:00 UTC to 2014-02-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-17 00:00:00 UTC to 2014-02-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-24 00:00:00 UTC to 2014-03-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-03 00:00:00 UTC to 2014-03-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-10 00:00:00 UTC to 2014-03-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-17 00:00:00 UTC to 2014-03-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-24 00:00:00 UTC to 2014-03-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-31 00:00:00 UTC to 2014-04-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMar 312014-04-07 00:00:00 UTC to 2014-04-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-14 00:00:00 UTC to 2014-04-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-21 00:00:00 UTC to 2014-04-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-28 00:00:00 UTC to 2014-05-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-05 00:00:00 UTC to 2014-05-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-12 00:00:00 UTC to 2014-05-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-19 00:00:00 UTC to 2014-05-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-26 00:00:00 UTC to 2014-06-02 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2014-06-02 00:00:00 UTC to 2014-06-09 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJun 2

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 272014-01-27 00:00:00 UTC2014-02-03 00:00:00 UTC101
Feb 32014-02-03 00:00:00 UTC2014-02-10 00:00:00 UTC000
Feb 102014-02-10 00:00:00 UTC2014-02-17 00:00:00 UTC000
Feb 172014-02-17 00:00:00 UTC2014-02-24 00:00:00 UTC000
Feb 242014-02-24 00:00:00 UTC2014-03-03 00:00:00 UTC000
Mar 32014-03-03 00:00:00 UTC2014-03-10 00:00:00 UTC000
Mar 102014-03-10 00:00:00 UTC2014-03-17 00:00:00 UTC000
Mar 172014-03-17 00:00:00 UTC2014-03-24 00:00:00 UTC000
Mar 242014-03-24 00:00:00 UTC2014-03-31 00:00:00 UTC000
Mar 312014-03-31 00:00:00 UTC2014-04-07 00:00:00 UTC000
Apr 72014-04-07 00:00:00 UTC2014-04-14 00:00:00 UTC000
Apr 142014-04-14 00:00:00 UTC2014-04-21 00:00:00 UTC000
Apr 212014-04-21 00:00:00 UTC2014-04-28 00:00:00 UTC000
Apr 282014-04-28 00:00:00 UTC2014-05-05 00:00:00 UTC000
May 52014-05-05 00:00:00 UTC2014-05-12 00:00:00 UTC000
May 122014-05-12 00:00:00 UTC2014-05-19 00:00:00 UTC000
May 192014-05-19 00:00:00 UTC2014-05-26 00:00:00 UTC000
May 262014-05-26 00:00:00 UTC2014-06-02 00:00:00 UTC101
Jun 22014-06-02 00:00:00 UTC2014-06-09 00:00:00 UTC110

What Hacker News says

3 sources
This is my preferred way of developing JS stuff. Build an object that you can use in pure JS, then integrations with other frameworks are nothing more than simple wrappers around that object. Check the code for the jQuery plugin [0], it's tiny! By the way, I'm not an angular user, the directive was added through a PR. If you hit any problems or have any suggestions to improve it, please get in touch on github! [0] https://github.com/WickyNilliams/headroom.js/blob/master/src...
In Headroom.js – hide your header on scroll
You do realise zepto works in IE10+ only, and even then you need an additional module for support. I wouldn't say it's worthwhile. It is not a viable alternative. I'm working on a widget that other people will embed on their page. I cannot make assumptions about jQuery being available and I cannot afford to add jQuery as a dependency. Assuming the widget was valuable to you, would you want to add my widget to your page if it included 94kb (jQuery 1.10.2 minified) of JS before my code was even added on top? If you cared about performance, it's highly unlikely you would. So for that reason I've been working with plain JS for months now. We have browser support back to IE9 (maybe even 8), and our entire codebase is around 25kb minified (gzipped < 6kb). We have one or two collections of utilities, but most of it is application code that would
Read the rest
still be there even if we had jQuery as a dependency. All I can say is it is not that big a problem. If you're not sure how to get something to work across browsers, look at the source of jQuery (this website [0] is fantastic for this purpose) or any other library that is well regarded. But you know what? Most of the time it isn't even a problem. And with modern tools [1][2] and a good test suite, it's not difficult testing across multiple browsers to quickly find issues. Before even working on this project I decided to go on a self-administered "jQuery diet". I haven't used jQuery in any personal projects [3][4] for at least a year and it's great. It took a little adjusting, but not much. If anything it was a little shocking. I thought I was a good JS dev, but it really opened my eyes to how little I knew about the DOM and other native browser APIs and, honestly, I felt a little ashamed. Conclusion: sometimes going it alone is the right decision. jQuery is absolutely the right choice in some environments, but it doesn't make it the right choice absolutely [0] http://james.padolsey.com/jquery/ [1] http://karma-runner.github.io [2] http://vanamco.com/ghostlab/ [3] https://github.com/WickyNilliams/headroom.js [4] https://github.com/WickyNilliams/enquire.js
In You might not need jQuery

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.