Skip to content

Instantly share code, notes, and snippets.

@jasontucker
Created October 9, 2012 04:47
Show Gist options
  • Save jasontucker/3856670 to your computer and use it in GitHub Desktop.
Save jasontucker/3856670 to your computer and use it in GitHub Desktop.
WPwatercooler at 11 to 11:30am autoplay
<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