Kieran Senior
Kieran Senior

Reputation: 18230

jQuery Intellisense Doesn't Work When Any Other JavaScript File Included

As the title says. If I include any other javascript file alongside jquery-1.4.1.js then intellisense for jQuery ceases to work. Any ideas why this happens? As always, I've had a good search around but without any luck, it should just work.

Cheers

Upvotes: 3

Views: 315

Answers (1)

Daniel Rikowski
Daniel Rikowski

Reputation: 72544

Sometimes IntelliSense gets messed up by certain .js files. In general there's nothing you can do except removing the offending part of the source using trial-and-error.

At least in VS 2008 SP1 you can use the can use the -vsdoc.js "hack":

If you include other.js, also create an empty other-vsdoc.js in the same directory.

Visual Studio will then use this empty file for IntelliSense, so that whatever harms IntelliSense in the original other.js will no longer be active.

That way you'll don't have IntelliSense for other.js, but at least jQuery will work.

Upvotes: 1

Related Questions