Skip to main content
100%

Minimal reponsive javascript framework

✓ Published0🌍 Public
SSimonS
Last edited Mar 8, 2012
Created on Mar 8, 2012

This example demonstrates a responsive design framework that switches between mobile, tablet, and desktop states based on the browser window's width. It uses jQuery to listen for window resize events, comparing the document width against breakpoints of 768 and 1100 pixels. The code triggers custom 'MOBILE', 'TABLET', and 'DESKTOP' events on the document, attaching show/hide functions to these states via the jQuery `live` API. A 200-millisecond timer minimizes lag during resizing.

AI-generated description

Similar vizzes