HOWTO: Managing JavaScript on Responsive Websites
From the blog:
Managing JavaScript on Responsive Websites | Viget
Since the project I was working on required browser support down to IE8 and I wanted my media queries and JavaScript to function (think older netbooks), I decided to create my own solution.
jRespond is a script that holds a list of user-defined functions that are fired based on the browser’s width compared to a list of customizable breakpoints. Entry and exit functions can be defined so transitions between breakpoints can be managed by removing and unbinding some page elements while creating and binding others. jRespond was built to be independent and browser agnostic. It does NOT sniff for media queries in the stylesheets.