Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio code jquery suggestion

Is there a way to get VSC to auto suggest various functions within jquery? does the main Jquery js file need to be linked to the software somehow?

As an example I started typing this

$('#test').app

and it suggests append?

like image 810
user2232552 Avatar asked Apr 30 '15 14:04

user2232552


People also ask

How do I enable suggestions in Visual Studio code?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript). Tip: The suggestions widget supports CamelCase filtering, meaning you can type the letters which are upper cased in a method name to limit the suggestions.

Does jQuery work on VSCode?

VSCode is by far the most advanced Free and Open source text editor on the planet. If you want to use jQuery with VSCode then this post is for you. I'll discuss how you can turn on the VSCode's Intellisense (Auto complete) for your jQuery project. Its fairly simple to setup and the impact it creates is just crazy.

How do I show suggestions in Visual Studio?

The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense.


1 Answers

Try using $ in a .js file. If you move your cursor near the warning, a light-bulb will appear. Either with Ctrl+. or by clicking on it, a code action will be proposed that will download and add a /// reference to jquery.d.ts that will give you all the nice IntelliSense for jQuery

Code action on $

like image 135
Alex Dima Avatar answered Oct 02 '22 18:10

Alex Dima