开发者

Disable Chrome Developer Tools' $ function

Chrome Developer Tools define a convenient $ function (as well as a few other conveniences). When using jQuery, however, it is convenient to have $ = jQuery. Is it possible to disable Chrome's autodef开发者_如何学编程ined $ function without disabling the more convenient definitions (like $0)?


Chrome's autodefined $ is supplanted by any function that may be on the page. Open a console on StackOverflow, for instance, and type $ === jQuery and you should get true. Unless I've misunderstood you, there is no need to disable Chrome's default $ to make room for other functions.


Your looking for jQuery.noConflict(). See here:

http://api.jquery.com/jQuery.noConflict/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜