Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Custom interval for polling? #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
7 changes: 5 additions & 2 deletions breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);


Expand Down Expand Up @@ -84,7 +85,9 @@
if (lastSize != w) {
lastSize = w;
}
},250);

//check for breakpoint every [frequency] ms (default = 250 ms)
},options.frequency);
};

})(jQuery);