Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

uncaught syntaxerror unexpected token ' var'

Javascript • Asked by Jim Miller

Hi all,

I am getting an error "uncaught syntaxerror unexpected token ' var'" . I'm using this JQuery plugin:
https://www.jqueryscript.net/time-clock/Attractive-jQuery-Circular-Countdown-Timer-Plugin-TimeCircles.html
The error is showing up on "var updateTime.
Here is the page that I am adding it to:
https://www.battlefieldtattooexpo.com/

Can anyone see what I am doing wrong?

Thanks ahead of time!

Jim

<script>
 var cl = cloudinary.Cloudinary.new({  cloud_name: 'downtown' });
 cl.responsive();
 //Script for CountDownTimer
 $("#DateCountdown").TimeCircles();
 $("#CountDownTimer").TimeCircles({ time: { Days: { show: false }, Hours: { show: false } }});
 $("#PageOpenTimer").TimeCircles();
 ------------
  var updateTime = function(){
   var date = $("#date").val();
   var time = $("#time").val();
   var datetime = date + ' ' + time + ':00';
   $("#DateCountdown").data('date', datetime).TimeCircles().start();
  }
 $("#date").change(updateTime).keyup(updateTime);
 $("#time").change(updateTime).keyup(updateTime);

// Start and stop are methods applied on the public TimeCircles instance
 $(".startTimer").click(function() {
  $("#CountDownTimer").TimeCircles().start();
 });
 $(".stopTimer").click(function() {
  $("#CountDownTimer").TimeCircles().stop();
 });

// Fade in and fade out are examples of how chaining can be done with TimeCircles
 $(".fadeIn").click(function() {
    $("#PageOpenTimer").fadeIn();
  });
 $(".fadeOut").click(function() {
   $("#PageOpenTimer").fadeOut();
  });
</script>

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,005+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.