[Tutorial] Working with jQuery in Visual Studio 2010

Everytime I start learning the new thing, I try to make it as beginner-friendly as possible. Quite a while ago, I have started working with a really great lightweight JavaScript library called – jQuery. So without further adieu, I bring to you a few steps which will be ultimately useful on the beginning of working with jQuery while using Visual Studio 2010 ( Ultimate ):

  • Create new project. Choose Visual C# -> Web -> ASP .NET Empty Web Application
  • Right click the project name, and choose Add -> New Item -> HTML file
  • The project is now ready for adding jQuery. Add the following code in the head section:

<script type=”text/javascript” src =”path to jQuery“></script><script type=”text/javascript” src =”path to jQuery documentation“></script>

  • Now you need to fill those “path to..” elements. It is always possible to stay updated with this website. In the moment of writing this tutorial jQuery 1.6.1 was the newest one, so if you are reading it in the mid 2011, use these links:
  • http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.js (choose this or the one below, for path to jQuery)
  • http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js
  • http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1-vsdoc.js (choose this one for path to jQuery documentation)

Thats it, now you have jQuery with intellisense ready to go. If you have found this tutorial useful, please leave a note below.