相关疑难解决方法(0)

未捕获的TypeError:无法调用未定义的方法'split'

我试图在我的网站上加入Quicksand脚本,但我失败了.
Firebug给了我这个错误65 Uncaught TypeError: Cannot call method 'split' of undefined:

对于这个脚本:

jQuery.noConflict();
jQuery(document).ready(function($){
    // Clone applications to get a second collection
    var $data = $("#portfolio-items").clone();

    //NOTE: Only filter on the main portfolio page, not on the subcategory pages
    $('#portfolio-terms ul li').click(function(e) {
        $("ul li").removeClass("active");   
        // Use the last category class as the category to filter by. This means that multiple categories are not supported (yet)
        var filterClass=$(this).attr('class').split(' ').slice(-1)[0];
jquery.custom.js:65 Uncaught TypeError: Cannot call method 'split' of undefined (repeated …
Run Code Online (Sandbox Code Playgroud)

jquery

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

jquery ×1