zertosh / jquery-audit

jQuery Audit
MIT License
563 stars 26 forks source link

Working with RequireJS #3

Closed ricksuggs closed 10 years ago

ricksuggs commented 10 years ago

When using a dependency manager and async javascript resource loader such as requirejs, it looks like the plugin is not able to initialize. Getting this in the "jQuery Audit" tab:

Error: "@(window.jQuery is missing)

image

zertosh commented 10 years ago

Hi. The extension checks every time you change nodes to see if there is a jQuery function on window. So, if jQuery is loaded async, you have to click to another node and then click back to force a reload. But this might not be your problem. Although jQuery 1.10.1 registers itself as an AMD module, it still creates a jQuery function on window unless you explicitly call jQuery.noConflict();. Maybe that's what's going on. In a day or two, I'll push out an update checks for an AMD module, and hopefully that'll resolve your issue.

ricksuggs commented 10 years ago

Great. Changing nodes worked! thanks

zertosh commented 10 years ago

Glad it worked out.