【问题标题】:jQuery Isotope Possible Chrome Bug?jQuery 同位素可能的 Chrome 错误?
【发布时间】:2012-05-01 16:38:47
【问题描述】:

我正在使用jQuery Isotope 填充多宽度多高度网格(等比例)上的空间。

使用 ui-sortable 对网格进行排序,并在排序后通过按钮切换回 Isotope。有一些排序顺序会留下空块。如何使用 Isotope 填充空格?

我尝试了多种同位素布局方法。

http://jsfiddle.net/zdSYG/41/

$(document).ready(function() {

var $itemList = $('#sortable');

    $itemList.isotope({
    resizesContainer: false,
    masonry: {
        rowHeight: 250,
        columnWidth: 325
    }
});

$('#wp-admin-bar-edit').click(function() {
    $itemList.isotope('destroy');

    $itemList.sortable({

        //Do Ajax Stuff with UI-Sort Order
    });

});
});
//Toggle back to Isotope after jQuery UI-Sortable Ajax stuff
$(document).ready(function() {
$('#wp-admin-bar-sort').click(function() {
    $('#sortable').isotope({
        resizesContainer: false,
        masonry: {
            rowHeight: 250,
            columnWidth: 325

        }
    });
});
});

日期:

在 Firefox 4 和 IE 8 和 9 中实现了预期效果,但问题似乎出在 Google Chrome(最新版本稳定频道)。

铬:

火狐4:

【问题讨论】:

  • Chrome 在此处抛出错误 第 4 行:$itemList.isotope({...}); 错误:Object [object Object] has no method 'isotope'
  • 其实这个好像是GET http://c3mdigital.com/pub/jquery.isotope.js 404 (Not Found)造成的

标签: jquery jquery-isotope


【解决方案1】:

我发现它是在我使用 jquery 的早期版本时,在我的例子中是 1.4.1。我搬到了 1.7.1,现在一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-11
    • 2021-11-06
    • 2011-06-16
    • 2011-11-02
    • 2012-03-05
    • 1970-01-01
    相关资源
    最近更新 更多