Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var resizeTimer = false;
- $(window).on('resize', function(e) {
- if( !resizeTimer ) {
- $(window).trigger('resizestart');
- }
- clearTimeout(resizeTimer);
- resizeTimer = setTimeout(function() {
- resizeTimer = false;
- $(window).trigger('resizeend');
- }, 250);
- }).on('resizestart', function(){
- console.log('Started resizing the window');
- }).on('resizeend', function(){
- console.log('Done resizing the window');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement