diff --git a/README.md b/README.md index ff317fa..e57ac5b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ Created by [XOXCO](http://xoxco.com) 480, 768, 1024 - ] + ], + // how often to check for breakpoint + frequency: 250 }); $(window).bind('enterBreakpoint320',function() { diff --git a/breakpoints.js b/breakpoints.js index 2e73a35..e44da56 100644 --- a/breakpoints.js +++ b/breakpoints.js @@ -30,7 +30,8 @@ $.fn.setBreakpoints = function(settings) { var options = jQuery.extend({ distinct: true, - breakpoints: new Array(320,480,768,1024) + breakpoints: new Array(320,480,768,1024), + frequency: 250 },settings); @@ -84,7 +85,9 @@ if (lastSize != w) { lastSize = w; } - },250); + + //check for breakpoint every [frequency] ms (default = 250 ms) + },options.frequency); }; })(jQuery);