{"author_name":"Brian Stegmann","cat":"LD #27","comments":[],"epoch":1377353700,"likes":3,"metadata":{"p_key":"40203","p_author":"Brian Stegmann","p_authorkey":"24792","p_urlkey":"75822","p_title":"Quick Tip for HTML5 Developers","p_cat":"LD #27","p_event":"LD27","p_time":"1377353700","p_likes":"3","p_comments":"0","p_status":"UPD5","us_key":"24792","us_name":"Brian Stegmann","us_username":"hyperbox","event_start":"1377216000","event_key":"18","event_name":"LD27"},"text":"<p>If you have jQuery included in your project, here&#8217;s an easy way to automatically pause your game if the user changes tabs or the web browser window loses focus:<\/p>\n <p>$(window).blur(function() {<\/p>\n <p>\/\/pausing code here<\/p>\n <p>});<\/p>\n <p>Voila!<\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/canvas\/\" rel=\"tag\">canvas<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/focus\/\" rel=\"tag\">focus<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/html5\/\" rel=\"tag\">html5<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/pause\/\" rel=\"tag\">pause<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/tip\/\" rel=\"tag\">tip<\/a><\/p>","time":"August 24th, 2013 9:15 am","title":"Quick Tip for HTML5 Developers"}