Answered by:
JQuery, Nuget & VSDocs

Question
-
Hi,
I am just starting out making my first app and I am getting a little confused getting JQuery up and running.
The appendTo VSDoc for JQuery is currently up to 1.8.3 so I used Nuget to install JQuery 1.8.3.
It says it has installed the reference but the JQuery file isn't in the scripts folder and JQuery commands are not working ($ is undefined).
I noticed it created a folder called packages outside the application root that appears to have the various files for it in there.
Should I add a script reference to the file in this package?
I cannot find any documentation for what I am supposed to do after I install from Nuget so I have come here for some advice. Can anyone help me?
Friday, January 18, 2013 2:53 AM
Answers
-
Hi,
Actually, you can just copy jquery file in the folder. And then refer that in the page. Any more question, please feel free to reply.
Roy
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked as answer by Song Tian Thursday, January 24, 2013 10:55 AM
Friday, January 18, 2013 9:57 AM -
I think I found the problem.
When I try to install jquery via nugget my VS2012 freezes. After I restart VS it says that it has installed jquery but it hasn't finished setting references and copying files.
I uninstalled the package and started VS2012 as administrator and installed again. This time it did not freeze and copied all the relevant files into the project.
- Marked as answer by Song Tian Thursday, January 24, 2013 10:55 AM
Friday, January 18, 2013 5:38 PM
All replies
-
Hi,
Actually, you can just copy jquery file in the folder. And then refer that in the page. Any more question, please feel free to reply.
Roy
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked as answer by Song Tian Thursday, January 24, 2013 10:55 AM
Friday, January 18, 2013 9:57 AM -
So if I install it via nuget I am meant to copy it out of the packages folder to the project folder?
Ive only used nuget for asp.net apps before and it usually puts everything in the right place. I am just wondering if I am missing some step as there is no documentation on codeplex or nuget regarding it. I'd rather use the jquery from nuget as I am assuming its been updated to fix the glitches with the standard jquery in windows apps.
Friday, January 18, 2013 5:07 PM -
I think I found the problem.
When I try to install jquery via nugget my VS2012 freezes. After I restart VS it says that it has installed jquery but it hasn't finished setting references and copying files.
I uninstalled the package and started VS2012 as administrator and installed again. This time it did not freeze and copied all the relevant files into the project.
- Marked as answer by Song Tian Thursday, January 24, 2013 10:55 AM
Friday, January 18, 2013 5:38 PM