Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add 480 as a default breakpoint

Add 480 listeners in example
  • Loading branch information...
commit 1bcea407907f9adc708071045fb61efc0fe7402f 1 parent 0325242
@benbrown benbrown authored
Showing with 10 additions and 1 deletion.
  1. +1 −1  breakpoints.js
  2. +9 −0 index.html
View
2  breakpoints.js
@@ -30,7 +30,7 @@
$.fn.setBreakpoints = function(settings) {
var options = jQuery.extend({
distinct: true,
- breakpoints: new Array(320,768,1024)
+ breakpoints: new Array(320,480,768,1024)
},settings);
View
9 index.html
@@ -17,6 +17,12 @@
$('#log').append('<p>Entering 320 breakpoint</p>');
});
+ $(window).bind('exitBreakpoint480',function() {
+ $('#log').append('<p>Exiting 480 breakpoint</p>');
+ });
+ $(window).bind('enterBreakpoint480',function() {
+ $('#log').append('<p>Entering 480 breakpoint</p>');
+ });
$(window).bind('exitBreakpoint768',function() {
$('#log').append('<p>Exiting 768 breakpoint</p>');
});
@@ -78,6 +84,8 @@
.breakpoint-1024 #status p.breakpoint1024 { color: #000; font-weight:bold; background: #F0F0F0; }
.breakpoint-768 #status p.breakpoint768 { color: #000; font-weight:bold; background: #F0F0F0;}
+ .breakpoint-480 #status p.breakpoint480 { color: #000; font-weight:bold; background: #F0F0F0; }
+
.breakpoint-320 #status p.breakpoint320 { color: #000; font-weight:bold; background: #F0F0F0; }
@@ -174,6 +182,7 @@
<div id="status">
<p class="breakpoint1024">1024</p>
<p class="breakpoint768">768</p>
+ <p class="breakpoint480">480</p>
<p class="breakpoint320">320</p>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.