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

Parsing jquery.cloud9carousel.js fails #9

@specious

Description

@specious

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions