jQuery detect maximize and restore buttons from browser
javascript, jquery
Solution
Try this:
$(window).bind('resize', function() {
$('body').prepend('<div>' + $(window).width() + '</div>');
});
JSFiddle Demo
Works fine in FF and Safari on the maximize/restore button.
Problem
I've seen a few posts but none really answered my question. I want to detect the browsers built in `maximize` and `restore` button clicks on the top right of the browser next to the `[X]` close button. I would like to trigger a function from this. `Window Resize` only works when you grab a corner and manually resize the browser. ``` $(window).bind('resize', function() {}); ``` Any help will be appreciated, thanks.