We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use JSLint to check my jQuery scripts and if I check code like this using "The Good Parts", it only tells me jQuery isn't defined - which is fine:
jQuery('.selector') .removeAttr('style') .show();
Now if I define an action and use it this way:
var showOrHide = 'show'; jQuery('.selector') .removeAttr('style') [showOrHide]();
I get an additional error stating Unexpected space before '['.
Unexpected space before '['.
The only way to get rid of this error is to format the script like this, which I think make it more unreadable:
var showOrHide = 'show'; jQuery('.selector') .removeAttr('style')[showOrHide]();
So my question is would it be possible to make the second example not produce an error?
Thanks :)
The text was updated successfully, but these errors were encountered:
You should take JSLint's advice.
Sorry, something went wrong.
No branches or pull requests
I use JSLint to check my jQuery scripts and if I check code like this using "The Good Parts", it only tells me jQuery isn't defined - which is fine:
Now if I define an action and use it this way:
I get an additional error stating
Unexpected space before '['.
The only way to get rid of this error is to format the script like this, which I think make it more unreadable:
So my question is would it be possible to make the second example not produce an error?
Thanks :)
The text was updated successfully, but these errors were encountered: