diff --git a/themes/infinity-hugo/static/js/main.js b/themes/infinity-hugo/static/js/main.js index c575071..303d300 100644 --- a/themes/infinity-hugo/static/js/main.js +++ b/themes/infinity-hugo/static/js/main.js @@ -33,17 +33,20 @@ $(document).ready(function(){ $hour = $('#countdown_dashboard').data('hour'); $minute = $('#countdown_dashboard').data('minute'); $second = $('#countdown_dashboard').data('second'); - $('#countdown_dashboard').countDown({ - targetDate: { - 'day': $day, - 'month': $month, - 'year': $year, - 'hour': $hour, - 'min': $minute, - 'sec': $second, - }, - omitWeeks: true - }); + + if ($('#countdown_dashboard').length > 0) { + $('#countdown_dashboard').countDown({ + targetDate: { + 'day': $day, + 'month': $month, + 'year': $year, + 'hour': $hour, + 'min': $minute, + 'sec': $second, + }, + omitWeeks: true + }); + } $(".about-slider").owlCarousel( {