Quick Tip for HTML5 Developers

Posted by (twitter: @brianstegmann)
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!

Tags: , , , ,


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]