Hi everyone,
I'm having some trouble getting a jQuery plugin to work correctly in my MVC view. Here's what it looks like at the moment: (I've copied all needed jQuery includes and css files into the /Scripts folder of the site)
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="/Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="/Scripts/jquery.MetaData.js" type="text/javascript"></script>
<script src="/Scripts/jquery.rating.js" type="text/javascript"></script>
<link href="/Scripts/jquery.rating.css" rel="stylesheet" type="text/css" />
<input name="rating" type="radio" class="star" value="1"/>
<input name="rating" type="radio" class="star" value="2"/>
<input name="rating" type="radio" class="star" value="3"/>
<input name="rating" type="radio" class="star" value="4"/>
<input name="rating" type="radio" class="star" value="5"/>
</asp:Content>
The intellisense is squawking that the link element above can't be nested within a div tag (what div?) Nor can intellisense find the "star" class in any of the input tags.
When I navigate to the page in question I don't see the stars, just a list of radio buttons. It's as if the jQuery stuff doesn't run.
Where should I put the script and link tags in an MVC view? Anyone have small samples I can go by as an example?
I'm going over this example from "Professional ASP.Net MVC" from Wrox and the Ajax chapter leaves something to be desired, as the code is all snippets with no complete pages. The Wrox website chapter code for this book also consists of the same snippets, one per text file, and is of no use.
Thanks!