Ask A Question

Notifications

You’re not receiving notifications from this thread.

uncaught syntaxerror unexpected token ' var'

Jim Miller asked in Javascript

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>
Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.