Submit your widget

handle events after a (window) resize with jQuery

Created 4 years ago   Views 10438   downloads 1381    Author nielse63
handle events after a (window) resize with jQuery
View DemoDownload 4.8 KB
48
Share |

Include both the jQuery library and the resizeEnd plugin on your page:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/jQuery.resizeEnd.js"></script>

Attach the resizeEnd method to an element, instatiate options (if so desired), and run a callback functions:

$(window).resizeEnd({
    delay : 250
}, function() {
    // Callback logic
});

If you want to use the default delay setting of 250ms, simply don't include the options object:

$(window).resizeEnd(function() {
    // Callback logic
});

Read more:https://github.com/nielse63/jQuery-ResizeEnd