Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
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
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,27 @@ Created by [XOXCO](http://xoxco.com)
]
});

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

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

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

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


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

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

4 changes: 2 additions & 2 deletions breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
var interval = null;

$.fn.resetBreakpoints = function() {
$(window).unbind('resize');
$(window).off('resize');
if (interval) {
clearInterval(interval);
}
Expand Down Expand Up @@ -59,7 +59,7 @@
}

// fire onExit when browser contracts out of a larger breakpoint
if (w < options.breakpoints[bp] && lastSize >= options.breakpoints[bp]) {
if (w < options.breakpoints[bp] && (lastSize >= options.breakpoints[bp] || !done)) {
$('body').removeClass('breakpoint-' + options.breakpoints[bp]);
$(window).trigger('exitBreakpoint' + options.breakpoints[bp]);

Expand Down