Hi all,
I am a beginner at using JQuery, and thus its plugins are a new thing to me. I have gotten JQuery itself installed and have a functioning Dialog widget working. However, I cannot seem to get the Star Rating widget working. I'm not sure if I'm not including the right files, or if I'm incorrectly using the code. This is primarily because I don't fully understand how the whole process works in general. Here are the applicable snippets of my code:
This is located in the <head> element of my HTML
- <link href="css\redmond\jquery-ui-1.8.11.custom.css" rel="stylesheet" type="text/css"/>
- <link href="jquery.ui.stars-3.0\jquery.ui.stars.css" rel="stylesheet" type="text/css"/>
- <link href="jquery.ui.stars-3.0\jquery.ui.stars.min.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="js\jquery-1.5.1.min.js"></script>
- <script type="text/javascript" src="js\jquery-ui-1.8.11.custom.min.js"></script>
- <script type="text/javascript" src="jquery.ui.stars-3.0\jquery.ui.stars.js"></script>
- <script type="text/javascript" src="jquery.ui.stars-3.0\jquery.ui.stars.min.js"></script>
- <script type="text/javascript">
- $("#avg-rating-wrapper").stars({
- captionEl: $("#avg-rating-cap"),
- disabled: true
- });
- $("#avg-rating").val('{$rating_info.rating_average}');
- $("#user-rating-wrapper").stars({
- captionEl: $("#user-rating-cap"),
- oneVoteOnly: true
- });
- </script>
And this is found in the <body> (Line 1 is unimplemented):
- Rating: <span id="stars-cap"></span>
- <div id="user-rating-wrapper">
- <select name="selrate">
- <option value="1">Very poor</option>
- <option value="2">Not that bad</option>
- <option value="3">Average</option>
- <option value="4" selected="selected">Good</option>
- <option value="5">Perfect</option>
- </select>
- </div>
There are certainly many things wrong with my code. Would anybody be willing to help me understand my conceptual errors, and then I might be able to determine how to syntactically fix it.
Thank you very much!