开发者

Disable Chrome Developer Tools' $ function

开发者 https://www.devze.com 2023-02-08 13:26 出处:网络
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 autode

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

精彩评论

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

关注公众号