'jQuery' is undefined

Jun 15, 2012 at 6:53 PM
Edited Jun 15, 2012 at 7:01 PM

Hello - I just downloaded this learning solution and decided to run the 'completed' solution but keep getting 'jQuery' errors. Am I missing something important to allow the solution to run without errors?

EDIT: Is it possibly related to the datasource? Solut6ion unzipped into the following folder: \MvcMusicStore-Completed\MvcMusicStore\App_Data\MvcMusicStore.sdf and the solution's connection string shows it's looking in a folder called "DataDirectory" does VS automatically translate this? :-)

    <add name="MusicStoreEntities"
     connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf"

(Be nice, I AM as inexperienced as my questions reveals!) 


Tony Bromirski

Eagle River, Alaska

Nov 23, 2012 at 9:44 PM
Edited Nov 23, 2012 at 9:45 PM

The answer to this question for me was found at http://mvcmusicstore.codeplex.com/workitem/6656

jongalloway wrote Jul 9, 2011 at 1:17 PM

This is because the version of jQuery was updated since the tutorial was last published. Make sure that the script reference in /Views/Shared/_Layout.cshtml matches the version of jQuery in your /Scripts folder, probably /Scripts/jquery-1.5.1.min.js.

For me, I changed "<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" to <script src="@Url.Content("~/Scripts/jquery-1.7.1.js")" as this was the version of jquery I was running when I created the solution.

Good Luck,