Collision prevention using jQuery
I was building a graph with Flot.js and wanted to display descriptive labels, placed above some vertical lines inside the graph, inside a gutter. I ran into the problem that, as the positioning of these labels was absolute, these labels would regularly overlap each other,..
Adaptive background using jQuery
To conserve bandwidth with large images, it can be a smart thing to offer your user only the image needed, based on their device size. Furthermore, it will allow you to output higher definition, and thus crispier, images for larger screens without compromising loading times..
Momentum scrolling using jQuery
tl;dr? Click here. Momentum – or inertial – based scrolling is one of the fairly ‘new’ phenomena introduced by touch devices in the last few years. Compared with a regular (linear) scroll, momentum scrolling offers a more natural way of scrolling that is easier on..
The Manifesto Manifesto
How to write a manifesto. Today, we write a manifesto. Today, our second sentence starts with the first word of the first sentence. We write a short sentence. Then a shorter one. Then a really, really long one that maybe doesn’t make any sense but..
Debouncing events with jQuery
For a thing I’m working on, I needed a ‘debounced‘ resize event, as the $(window).resize event keeps firing as long as the user resizes his window. Maximizing the window with a single click just causes 1 event fired, but by dragging the browser window bigger/smaller,..