gpt4 book ai didi

jQuery Isotope 可能是 Chrome 错误吗?

转载 作者:行者123 更新时间:2023-12-03 22:42:18 26 4
gpt4 key购买 nike

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

网格使用 ui-sortable 进行排序,并有一个按钮可以在排序后切换回同位素。有一些排序顺序会留下空 block 。如何使用同位素来填充空格?

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

参见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(最新版本稳定 channel )上。

Chrome:

enter image description here

火狐4:

enter image description here

最佳答案

我发现这是当我使用早期版本的jquery时,在我的例子中是1.4.1。我迁移到 1.7.1,现在一切正常。

关于jQuery Isotope 可能是 Chrome 错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6233270/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com