Posts Tagged ‘pause’

Quick Tip for HTML5 Developers

Posted by (twitter: @brianstegmann)
Saturday, August 24th, 2013 9:15 am

If you have jQuery included in your project, here’s an easy way to automatically pause your game if the user changes tabs or the web browser window loses focus:

$(window).blur(function() {

//pausing code here

});

Voila!

[cache: storing page]