1

Intellisense works for JavaScript but not jQuery.

I have followed these recommendations HERE, but I do not think they work for VS2013 any more.

Since this is my first question, I cannot post images, but my error is identical to the thread linked within this message. The only difference is that I am using vs2013 professional.

I have placed photos on the MSDN forum so you can see my error HERE

Community
  • 1
  • 1
Brian Emmerling
  • 37
  • 1
  • 2
  • 8
  • 1
    tried to drag the jquery file on top of the Js file where you want to use intellisense :) meanwhile check this post http://stackoverflow.com/questions/11488208/intellisense-doesnt-work-for-js-in-vs2012 – Anirudha Gupta Nov 27 '13 at 02:30
  • Yes sir, I have done that. I then reset intellisense ctrl + shift + J, and then cleaned and built the solution. Still no dice. Is there possibly a vs2013 bug? – Brian Emmerling Nov 27 '13 at 02:47
  • You can report it on connect.microsoft.com but it will take a long time to get response from them. – Anirudha Gupta Nov 27 '13 at 02:52

3 Answers3

1

I see from your comments that you have this working now, but I'll follow-up with the same response I used on the Microsoft Connect bug reported for this item, in case someone else comes upon this question.

I followed the link to the MSDN forum post at:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/4d9a69e8-38cf-4fe8-9c9f-271d03a19be1/visual-studio-2013-jquery-intellisense-not-fully-working?forum=wpdevelop

From this post, it looks like the issue is with the JavaScript source:

function person(name, age) {
    this.name = name;
    this.age = age;
}

var me = person(brian, 39);

When typing "me." you are shown a generic list of identifiers (i.e. names) in the source. This is because the source is not valid JavaScript when executed. First, the person function is being used as a constructor and so you need to use "new person(" to call it. Second, the name brian is used like a variable, but I assume it's supposed to be a string "brian". Here's a corrected version of this source that should fix your issue:

function person(name, age) {
    this.name = name;
    this.age = age;
}

var me = new person("brian", 39);

I hope this helps! - Jordan (Microsoft Visual Studio, JavaScript tools team)

Jordan Matthiesen
  • 1,480
  • 7
  • 17
  • Jordan thanks, I was going to come back and update. You are correct. That line hosed the intellisense for me until it was fixed. – Brian Emmerling Dec 06 '13 at 13:01
0

Visual studio 2012 update 4 is more stable then latest 2013 version.

Everything you can do in 2013 can easily done in Visual studio 2012. I have seen many people puzzling a lot for fix the common thing.

Save your time and try VS 12 update 4. You feel it's better stable then 2013.

Hope this help !

Anirudha Gupta
  • 9,073
  • 9
  • 54
  • 79
  • Ok, I will try that in the AM and report back. – Brian Emmerling Nov 27 '13 at 03:29
  • The snippet solution works on VS 2012. Thank you for the help. – Brian Emmerling Nov 27 '13 at 23:17
  • UPDATE:: JQuery intellisense has started working for me in VS2013. Some depreciated function such as innerHeight do not, and sometime when you introduce new keywords (ie a function name or variable name, it can get buggy.) The only thing new I did was create a JavaScript Project. Then I closed it, and reopened my WP8 solution and jquery intellisence was working. – Brian Emmerling Nov 30 '13 at 04:19
0

In VS : go to the "Tools > Options > Text Editor > JavaScripts >IntelliSense >References" And add jquery-version.intellisense.js reference to the list of references and restart visual studio. it works for me. Hope this help !

Amirhossein Yari
  • 2,054
  • 3
  • 26
  • 38