Skip to content
Trigger jQuery events for your responsive design breakpoints!
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Clean up the readme and example file to be useful and distinct! Nov 16, 2011
breakpoints.js Add 480 as a default breakpoint Nov 16, 2011
example.html Fix text of example.html -> demo is below, not to the right! Nov 30, 2011

README.md

Breakpoints.js

Define breakpoints for your responsive design, and Breakpoints.js will fire custom events when the browser enters and/or exits that breakpoint.

Get it from Github

View Demo

Created by XOXCO

Instructions

$(window).setBreakpoints({
// use only largest available vs use all available
	distinct: true, 
// array of widths in pixels where breakpoints
// should be triggered
	breakpoints: [
		320,
		480,
		768,
		1024
	] 
});		

$(window).bind('enterBreakpoint320',function() {
	...
});

$(window).bind('exitBreakpoint320',function() {
	...
});

$(window).bind('enterBreakpoint768',function() {
	...
});

$(window).bind('exitBreakpoint768',function() {
	...
});


$(window).bind('enterBreakpoint1024',function() {
	...
});

$(window).bind('exitBreakpoint1024',function() {
	...
});
You can’t perform that action at this time.