未捕获的TypeError对象没有方法“可排序" [英] Uncaught TypeError Object has no method 'sortable'

查看:71
本文介绍了未捕获的TypeError对象没有方法“可排序"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了针对此问题的一些修复程序,但它们并非特定于此.我已经读过像Sortable()这样的简单事情,需要小写.当然,我没有先将其设置为大写.

I've found a few fixes for this issue already but they aren't specific to this. I've read simple things like Sortable() needs to be lowercase. Of course, I do not have it set as uppercase first.

我已经进行了这项工作,然后突然决定在控制台上的Uncaught TypeError: Object [object Object] has no method 'sortable'的第210行吐出以下内容:

I already had this working and then suddenly it decided to spit out the following in the console Uncaught TypeError: Object [object Object] has no method 'sortable' on line:210 which correspondes to:



    // Line 210 is below
    $('.sortable').sortable({
         stop: get_post_order
    }).disableSelection();
    // Check new order
    function get_post_order() {
        var post_list = [], pids;
        $('.inner-pop-list li a').each(function() {
            pids = $(this).attr('rel');
            post_list.push(pids);
        });
        $('.export').attr('href', '?format=pdf&pids='+post_list);
    }

在重新排序列表之后,应该更新post_list数组. get_post_order根本没有运行.我试过将函数直接添加到stop: function() {...}中,但仍然没有任何变化.

It should be updating the post_list array after the list has been reordered. The get_post_order is not running at all. I've tried adding the function directly into the stop: function() {...} but still no change.

任何想法,我都很困惑.

Any ideas, I'm pretty stumped.

谢谢

推荐答案

固定的,有时从别人那里获得新鲜的方法会带您找到答案.谢谢你的帮助.它使我看了我的网站的标题.我注意到我已经在标题中添加了sortable()声明.然后,我在外部脚本(第210行)中再次引用了sortable,引起了冲突.

Fixed, sometimes getting fresh approaches from other people leads you to the answer. Thanks for your help. It made me look at the header of my site. I noticed I'd already added the sortable() declaration in the header. Then I'd referenced sortable again in an external script (which was line 210) causing a conflict.

所以答案是,一次引用sortable()!

So the answer is, reference sortable() once!

这篇关于未捕获的TypeError对象没有方法“可排序"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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