0

is there a way to detect if the user clicked on the minimize button a website? I need it to raise an event for my web game. I've used

$(window).resize(function() {
   //TODO: Add event here...
}};

but really all it detects is if I've manipulated the width and or height of the window. It doesn't do anything if I click on the minimize window button.

I hope someone has stumbled onto this situation and can help me figure this out. Many thanks in advance!

mmangual83
  • 151
  • 1
  • 2
  • 11
  • Why minimise but not tab switch etc.? – reupen Jan 06 '16 at 21:45
  • I haven't personally done it myself but I've found this link, uses javascript not JQuery - http://stackoverflow.com/questions/5847108/is-it-possible-to-tell-if-a-user-has-my-page-minimized-or-the-inactive-tab – Matt Hammond Jan 06 '16 at 21:47
  • Also see http://stackoverflow.com/questions/552118/jquery-toggle-on-window-minimize/552183#552183 – Barmar Jan 06 '16 at 22:13

0 Answers0