我想在我的网站上添加星级。
这是我的 cshtml 标记
@{
ViewBag.Title = "דירוג";
Layout = "~/Views/Shared/_SubPage.cshtml";
ViewBag.Page = "Rating";
ViewBag.TabHeader = "דירוג";
}
@*=====css=====*@
<link href="@Url.Content("~/Resources/jquery.ui.stars-3.0/jquery.ui.stars.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Styles/Rating.css")" rel="stylesheet" type="text/css" />
<form>
Rating: <span id="stars-cap"></span>
<div id="stars-wrapper1" class="span4 oofset3">
<input type="radio" name="newrate" value="1" title="Very poor" />
<input type="radio" name="newrate" value="2" title="Poor" />
<input type="radio" name="newrate" value="3" title="Not that bad" />
<input type="radio" name="newrate" value="4" title="Fair" />
<input type="radio" name="newrate" value="5" title="Average" checked="checked" />
<input type="radio" name="newrate" value="6" title="Almost good" />
<input type="radio" name="newrate" value="7" title="Good" />
<input type="radio" name="newrate" value="8" title="Very good" />
<input type="radio" name="newrate" value="9" title="Excellent" />
<input type="radio" name="newrate" value="10" title="Perfect" />
</div>
</form>
<script src="@Url.Content("~/Resources/jquery.ui.stars-3.0/jquery.ui.stars.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Rating.js")" type="text/javascript"></script>
我在浏览器开发控制台中收到以下错误:
jquery.ui.stars.js:20 Uncaught TypeError: Object function (a,b){return new d.fn.init(a,b,g)} has no method 'widget' jquery-1.5.1.min.js:19 Uncaught TypeError: Object [object Object] has no method 'on'
更改为 jquery 1.7.2 后,我得到以下信息:
jquery.ui.stars.js:20 Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'widget' Rating.js:23 Uncaught TypeError: Object [object Object] has no method 'stars'
在 UI 中,我看到单选框而不是开始。我怎样才能解决这个问题?