Questions tagged [jquery-lint]

jQuery-Lint is a debugging script that reports errors in the use of jQuery -- at runtime. Additionally, it "offers guidance on best practices and performance concerns." ... jQuery-Lint is also included in the FireQuery plugin.

jQuery-Lint is a debugging script that reports errors in the use of jQuery at runtime. Additionally, it "offers guidance on best practices and performance concerns."

jQuery-Lint is JavaScript code that can be downloaded and included into your page, and/or it is built into the FireQuery plugin for Firebug.

jQuery-Lint continues the tradition of Lint in that it's designed to pick "fluff" from jQuery code beyond what the normal warnings and exceptions issued by any one browser's JavaScript runtime.

Resources:

16 questions
5
votes
3 answers

tools for finding errors in my jquery

Is there any sort of tool (online or DLable) that I could use to check my jquery code for syntax errors, unclosed {}, or other things that might cause it to not work as expected?
aslum
  • 11,774
  • 16
  • 49
  • 70
4
votes
1 answer

jQuery Lint Errors

I found out about jQuery Lint in the Firebug plugin. However its results are confusing and very hard to try and satisfy. I get hundreds of errors saying jQuery (...) called incorrectly. For example this line comes up with that warning. What am i…
Timothy Ruhle
  • 7,387
  • 10
  • 41
  • 67
3
votes
0 answers

Prestashop admin error

I'm getting below error at Firebug console at the moment: attr(id) special check failed jquery.lint.js (line 99) More info: Insted of accessing the property via attr(id), use undefined insted Collection: [input.button…
Jae Kun Choi
  • 2,011
  • 5
  • 25
  • 32
3
votes
2 answers

How to Debug javascript and jquery with firebug

I just installed firebug and want to see and debug jquery and javascript methods when fired. Suppose that a jquery function will be called when button is clicked. When the site is huge and the page includes many js files then it is very difficult…
Thomas
  • 33,544
  • 126
  • 357
  • 626
3
votes
2 answers

Using native code functions as JavaScript objects in WebKit

I'm unable to use native code functions as JavaScript objects in WebKit-based browsers. Is it impossible to alias these functions directly? This is easiest to explain by example, so here is what I am running in the Developer Tools…
PCheese
  • 3,231
  • 28
  • 18
2
votes
4 answers

JQuery Lint says: "You've used the same selector more than once." I don't think I have

Here's my problem child: jQuery(document).ready(function() { var a = jQuery('img[title*="after"]'); a.parents('dl.gallery-item').addClass('after'); a.addClass('after'); var b = jQuery('img[title*="before"]'); …
richoid
  • 21
  • 3
2
votes
2 answers

Refactor jquery to pass jquery-lint

I have the following code in an html page jQuery("input[name='newstate']").change(function(){ if(jQuery(this).attr("checked")) { jQuery('input[name="new-state-name"]').show(); } else { …
robert
  • 8,459
  • 9
  • 45
  • 70
1
vote
1 answer

jQuery-Lint with jQuery 1.6.2 throws many warnings which aren't useful?

I found a little example for jQuery-Lint (lint example on jsfiddle.net) in jsfiddle. But, when I test this with jQuery 1.6.2, jQuery-Lint throws many (extra) warnings in firebug... So is jQuery-Lint not useful for jQuery 1.6.2 testing?
Raphael
  • 673
  • 1
  • 9
  • 27
1
vote
1 answer

jQuery Lint errors are quite non-descriptive

I want to use jQuery Lint to check for possible jQuery errors. I wanted to try it out on a simple script that works. I included jquery lint all right, set it to level 2 and BAM there was 3 errors. jQuery(.highlightimage) special check…
vinczemarton
  • 7,756
  • 6
  • 54
  • 86
1
vote
1 answer

How can I make this jquery function more terse?

I have this code in a common javascript file in my asp.net project. jQuery-Lint returns "You've used the same selector more than once" whenever I mouse over one of the buttons that was affected by this function. //turns all the buttons into jqueryUI…
Dave Neeley
  • 3,526
  • 1
  • 24
  • 42
1
vote
4 answers

lint warning that val() and text() are called incorrectly

I have: TotalPrice = parseInt(TotalPrice*100)/100; $('input[name=EstimatedPrice]').val(TotalPrice); $('#EstimatedPriceDisplay').text(TotalPrice); and I'm getting two warnings from lint. val() called incorrectly text() called incorrectly. I was…
Phillip Senn
  • 46,771
  • 90
  • 257
  • 373
1
vote
0 answers

Alternative to jQuery Lint?

I'm wondering if there is an alternative to jQuery Lint which is able to perform static analysis rather than runtime/in-browser analysis, i.e. I want a tool which doesn't need to run in a browser and can analyse the source code of an entire…
sversch
  • 856
  • 8
  • 22
0
votes
1 answer

Why does jQuery-Lint tell me .css() isn't a function?

jQuery-Lint is throwing the following error for me: $(".around_divboxes").css is not a function $('.around_divboxes').css('marginLeft', '0px'); Can someone tell me why it throws this error, and how to solve it?
Raphael
  • 673
  • 1
  • 9
  • 27
0
votes
1 answer

jQuery lint (FireQuery) gives loads of warnings when dragging a div

I am using jQuery-Lint (or more specifically FireQuery) to check my code which uses a drag operation. I've simplified it in the code below, but I still get the same messages from jQuery-Lint every time my mouse moves: You've called css([object…
Grezzo
  • 2,220
  • 2
  • 22
  • 39
0
votes
2 answers

jQuery: Resizable Issue in FF - debug help needed

Please try the following in Firefox (my version: 3.6.12). This was working and now it's not. IT does work in IE and it works in jsFiddle from w/in FF - I'm thinking an addon may be affecting it. Code:
vol7ron
  • 40,809
  • 21
  • 119
  • 172
1
2