jQuery .sortable不是一个函数 [英] jQuery .sortable is not a function

查看:61
本文介绍了jQuery .sortable不是一个函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使我按照jQuery UI文档中的说明操作,我也会收到.sortable不是函数的错误。

这是我的代码:

 < div style =float:left;> 
< span class =captionstyle =width:255px; display:block;>
已分配的限额
< / span>
< div class =assigned-limit-box>
< ul id =limAssignedclass =ul-base>
< / ul>
< / div>
< / div>

这是我的js:



<$ p $ 。p> $( '#limAssigned')排序();

我的jQuery js在我的jQuery UI js之前加载。



我做错了什么?

解决方案

我弄清楚了。我需要排序的页面被加载到我的主页面中的div中。我不得不将jQuery UI脚本添加到该jsp而不是主页面jsp。有趣的是如何成功。


Even though I've followed the directions in the jQuery UI documentation, I'm getting the error that .sortable is not a function.
Here is my code:

<div style="float: left;">
    <span class="caption" style="width: 255px; display: block;">
        Assigned Limits
    </span>
    <div class="assigned-limit-box">
        <ul id="limAssigned" class="ul-base">
        </ul>
    </div>
</div>

This is my js:

$('#limAssigned').sortable();

My jQuery js is loaded before my jQuery UI js.

What am I doing wrong?

解决方案

I figured it out. The page that I needed sortable for is loaded into a div within my main page. I had to add the jQuery UI script to that jsp rather than the main page jsp. Funny how that worked out.

这篇关于jQuery .sortable不是一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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