当使用jquery选择器时,JSHint说没有定义$符号。例如:
'use strict';
// Some great code above
$('li').addClass('active');
$('li').removeClass('obsolete');正如您所看到的,这段代码是可以的,但是运行grunt jshint我得到:
Running "jshint:all" (jshint) task
app/scripts/stuff/script.js
line 4 col 1 '$' is not defined.
line 5 col 1 '$' is not defined.
✖ 2 problems我该怎么做才能去掉警告呢?
发布于 2014-10-04 19:37:23
https://stackoverflow.com/questions/26196442
复制相似问题