Jquery和Jslint - '$'在定义之前使用 [英] Jquery and Jslint - '$' was used before it was defined
本文介绍了Jquery和Jslint - '$'在定义之前使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些第三方javascript正在使用,我在javascript文件中添加了一些jquery代码。但是在使用Jslint进行验证时,上述代码似乎失败了
I have some third party javascript im working with, I added some jquery code into it the javascript file. But it seems to fail on the above code when validating using Jslint
'$' was used before it was defined.
我可以在javascript文件的顶部看到它声明:
I can see at the top of the javascript file it states:
/*global alert: false, console: false, jQuery: false */
我对Javascript和JQuery相对较新,所以欢迎任何帮助。
Im relatively new to Javascript, and JQuery, so any help would be welcome.
推荐答案
将这些选项添加到您的评论中:
Add these options to your comments:
/*jslint browser: true*/
/*global $, jQuery, alert*/
这篇关于Jquery和Jslint - '$'在定义之前使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文