Zipper
Zipper

Reputation: 7204

IntelliJ unresolved function or method with jQuery

I've been fighting with $ being marked as unresolved function or method when IntelliJ is doing it's analysis. I tried downloading the jQuery library as part of IntelliJ and set the scope to global, but it still doesn't work. I'm currently using jquery 12.1.6.

Is there a way to get IntelliJ to realize that the $ is defined globally?

Upvotes: 8

Views: 6841

Answers (1)

hizbul25
hizbul25

Reputation: 3849

The jQuery v1.11.0 shows exactly the same behaviour here as well. At the same time previous version 1.10.2 works fine in IDE (no warnings).

I think it has something to do with "AMD-fy jQuery source" ticket (http://bugs.jquery.com/ticket/14113) -- looks like IDE has some issues figuring out this style.

If you wish (and can) -- roll back to jQuery v1.10.2 (which is like half a year old, which means it's stable and still good to use).

Hopefully IDE will be able to properly parse this new jQuery style in next release.

Actual ticket: http://youtrack.jetbrains.com/issue/WEB-10908

Upvotes: 1

Related Questions