SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question JSLint and JQUERY

    Hey,

    Does anyone know if there is a compatibility issue with JSLint and JQUERY?
    "Persistence is the path to perfection"

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,682
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    Hey,

    Does anyone know if there is a compatibility issue with JSLint and JQUERY?
    There shouldn't be.

    Why?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well basically when I use JSlint on JS fiddle, it says your code is valid but if I put the same piece of sample JQuery into JSLint.com it brings up errors like:

    Error:

    Problem at line 1 character 14: '$' was used before it was defined.
    "Persistence is the path to perfection"

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,682
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    Well basically when I use JSlint on JS fiddle, it says your code is valid but if I put the same piece of sample JQuery into JSLint.com it brings up errors like:

    Error:

    Problem at line 1 character 14: '$' was used before it was defined.
    There is a section of the jslint.com page at the bottom where you can put in variables that you expect to be predefined.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah ok I will examine it closer, I couldn't see the $ variable. It seems like a very useful validation tool, do you use it much?
    "Persistence is the path to perfection"

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,682
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    do you use it much?
    It's a very useful learning tool. I used to use it more than I do so now. It's still good to pass some code through it now and then though just to ensure that my understanding of code techniques is still up to snuff.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •