简单的jQuery sortable()在mvc5中不起作用? [英] Simple jQuery sortable() is not working in mvc5?

查看:68
本文介绍了简单的jQuery sortable()在mvc5中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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)

推荐答案

function (){


#调用sortRows)排序();
alert( jQuery Working
});
("#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)


这篇关于简单的jQuery sortable()在mvc5中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆