问题描述
jQuery Function is
Importing the JS Files
<script src="~/Scripts/jquery-2.1.4.js"></script>
<script src="~/Scripts/jquery-ui-1.11.4.js"></script>
$(function () {
$("#sortRows").sortable();
alert("jQuery Working")
});
My View is
@foreach (var item in Model) {
<tr id="sortRows">
<td><pre>
@ Html.DisplayFor(modelItem => item.ProductName)
@ Html.DisplayFor(modelItem => item.ProductCode)
@ Html.DisplayFor(modelItem => item.ProductDescritption)
@Html.DisplayFor(modelItem => item.ProductName)
@Html.DisplayFor(modelItem => item.ProductCode)
@Html.DisplayFor(modelItem => item.ProductDescritption)
推荐答案
My View is
@foreach (var item in Model) {
<tr id="sortRows">
<td><pre>
@ Html.DisplayFor(modelItem => item.ProductName)
@ Html.DisplayFor(modelItem => item.ProductCode)
@ Html.DisplayFor(modelItem => item.ProductDescritption)
@Html.DisplayFor(modelItem => item.ProductName)
@Html.DisplayFor(modelItem => item.ProductCode)
@Html.DisplayFor(modelItem => item.ProductDescritption)
这篇关于简单的jQuery sortable()在mvc5中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!