Detect Browser Window Resize Events
Add-ons

Plugin Description: A small plugin for handling window resize events.
When users resize the browser window, the jQuery Resize End Plugin responds accordingly.
Usage Instructions
Include both the jQuery library and the resizeEnd plugin on your web page:
1 2 | <script src="js/jQuery.resizeEnd.js"> </ SCRIPT> |
Apply the resizeEnd method to an element, initialize the options (if needed), and execute a callback function:
1 2 3 4 5 | $(window).resizeEnd({ delay : 250}, function() { // Callback logic}); |
If you want to use the default delay of 250ms, simply omit the options object:
1 2 3 | $(window).resizeEnd(function() { // Callback logic}); |
Default
Currently, the only default setting is the delay before the callback is executed. This is specified as an integer in milliseconds.
1 2 3 | { delay : 250} |
评论