sizeit.js : A javascript helper for responsive web design

sizeit.js : A javascript helper for responsive web design

sizeit.js is a JavaScript utility that detects the screen size and loads external css based on the settings you configure. Works kinda like media queries.

In many cases, media queries do just fine, but not always. The reason I created sizeit was for building web apps. I need more control over the appearance and content than what CSS and media queries allow. Using JavaScript to handle size detection, this information is available for application scripts as well as templating tools like jQuery Templates or Mustache.

Other reasons for using sizeit.js? Media queries are not supported in older browsers. By dynamically loading external CSS based on window size, sizeit.js eliminates the need to load extra css for all the various screen sizes. JavaScript can’t hook into media queries, which are purely a CSS convention, so I’ve seen examples of using both together. With sizeit.js, all your screen size detection is handled in one spot.

Leave a Reply