Skip to content

Commit

Permalink
Merge pull request #5583 from joeworkman/trigger-resize-onload
Browse files Browse the repository at this point in the history
Trigger all known resize events on window load
  • Loading branch information
cmwinters committed Aug 20, 2014
2 parents b038b7e + edc011a commit 1d767aa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion js/foundation/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}
});
}
// # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
// # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
if (typeof method === 'string') {
return this[method].call(this, options);
}
Expand Down Expand Up @@ -316,6 +316,18 @@
}
}

S(window).load(function(){
S(window)
.trigger('resize.fndtn.clearing')
.trigger('resize.fndtn.dropdown')
.trigger('resize.fndtn.equalizer')
.trigger('resize.fndtn.interchange')
.trigger('resize.fndtn.joyride')
.trigger('resize.fndtn.magellan')
.trigger('resize.fndtn.topbar')
.trigger('resize.fndtn.slider');
});

return scope;
},

Expand Down

0 comments on commit 1d767aa

Please sign in to comment.