Created
October 9, 2012 04:47
-
-
Save jasontucker/3856670 to your computer and use it in GitHub Desktop.
WPwatercooler at 11 to 11:30am autoplay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var now = new Date(), | |
day = now.getDay(), | |
hour = now.getHours(); | |
//Check if day is Mon | |
if(0 = day) { | |
//check between 11am and 11:30am | |
if(11 <= hours <= 00) { | |
if(hours !== 11 || now.getMinutes() <= 30) { | |
var $j = jQuery.noConflict(); | |
$j(("iframe").attr("src", $("iframe").attr("src").replace("autoplay=0", "autoplay=1")); | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment