Skip to content

Instantly share code, notes, and snippets.

@harisenbon
Created January 10, 2017 17:00
Show Gist options
  • Select an option

  • Save harisenbon/5c564f44aefc24e543f58b4404abc612 to your computer and use it in GitHub Desktop.

Select an option

Save harisenbon/5c564f44aefc24e543f58b4404abc612 to your computer and use it in GitHub Desktop.
Creating an EG Webinar Page using Lead Pages Default Design
/**
* Set the countdown date in line 11, and the script will automatically update the countdown timer as well as the text on the page.
*
**/
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.11/moment-timezone-with-data-2010-2020.min.js"></script>
<script type="text/javascript">
jQuery(function(){
// Set Date for this (next) monday at 5pm PST
var countdown = moment().tz('America/Los_Angeles').day(1).hour(17).minute(00).second(00);
if(countdown.isBefore()){ countdown.add(1, 'w'); }
$('#countdown').attr('data-timestamp', countdown.valueOf());
$('#calendar-month').text( countdown.format('MMMM') );
$('#calendar-date').text( countdown.format('D') );
$('#month-date-text').text( countdown.format('MMMM Do') );
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment