Skip to content
This repository has been archived by the owner on Jan 1, 2019. It is now read-only.

Parsing jquery.cloud9carousel.js fails #9

Open
specious opened this issue Nov 23, 2015 · 1 comment
Open

Parsing jquery.cloud9carousel.js fails #9

specious opened this issue Nov 23, 2015 · 1 comment

Comments

@specious
Copy link

Parsing of jquery.cloud9carousel.js fails using the parser demo ( http://www.cjihrig.com/development/jsparser/ ) with error message:

SyntaxError:  Parse error on line 243:
...o rotate    //    this.go = function( 
---------------------^
Expecting ',', ';', got 'THIS'

I have been able to make the parser succeed with any of the following changes:

  • Remove all preceding // comments
@@ -242,9 +242,6 @@
       this.timer = 0;
     }

-    //
-    // Spin the carousel.  Count is the number (+-) of carousel items to rotate
-    //
     this.go = function( count ) {
       this.destRotation += (2 * Math.PI / this.items.length) * count;
       this.play();
  • Insert a comma: ,
@@ -240,7 +240,7 @@
     this.pause = function() {
       this.smooth && cancelFrame ? cancelFrame( this.timer ) : clearTimeout( this.timer );
       this.timer = 0;
-    }
+    },

     //
     // Spin the carousel.  Count is the number (+-) of carousel items to rotate
  • Insert a semicolon: ;
@@ -240,7 +240,7 @@
     this.pause = function() {
       this.smooth && cancelFrame ? cancelFrame( this.timer ) : clearTimeout( this.timer );
       this.timer = 0;
-    }
+    };

     //
     // Spin the carousel.  Count is the number (+-) of carousel items to rotate
@cjihrig
Copy link
Owner

cjihrig commented Nov 23, 2015

Thanks for the report. I haven't really had the time to work on this lately, but I'd take a PR fixing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants