Skip to content

Trigger jQuery events for your responsive design breakpoints!

Notifications You must be signed in to change notification settings

dynamicaction/breakpoints

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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() {
	...
});

About

Trigger jQuery events for your responsive design breakpoints!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 53.0%
  • JavaScript 47.0%