简体   繁体   中英

best way to add jquery to an “empty” web project in visual studio?

Hey so when i start a new solution and pick "web application" visual studio goes ahead and by default creates a script folder with jquery-1.4.1.js, jquery-1.4.1.min.js, and jquery-1.4.1-vsdoc.js. But if I instead start a new solution and pick "empty web application" there are no folders which is to be expected obviously. I am just wondering what is the best way to add jquery into my new project, should i just copy and paste the scripts folder from a default web application?

thanks in advance!

Use NuGet! It will install things in the proper folders, and keep track of things for you. No reason to do this yourself anymore.

Right click on your solution, choose manage packages. Search for jquery and install it. You might need to install the Nuget package manager if you haven't got it already.

Use nuget package http://nuget.org/packages/jquery

The command is "Install-Package jQuery"

或者,您可以在每次在项目中使用时创建所需文件的集合,并将该文件粘贴到空项目中......

You can just create a folder call script and drag the jquery libary into that folder(or use add exisitng item). New version Jquery library is available for download on http://docs.jquery.com/Downloading_jQuery

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM