如何通過Ajax刪除項目時如何刷新砌體?這是我用來刪除該項目的代碼:刪除項目時刷新jquery.masonry
if($deletes = $('a[rel=delete]')) {
$deletes.click(function() {
if(!window.confirm('Are you sure you wish to delete this picture?'))
return false;
$t = $(this);
$.post(
$t.attr('href'),
{},
function(data) {
if(data == "success")
$t.parents('.deleteable:first').fadeOut();
}
);
return false;
});
}
我想要刷新的原因是在刪除項目後刪除產生的空格。
請考慮選擇一個正確的答案。 – Chango 2013-05-15 14:30:12
[使用jquery masonry隱藏元素後重新組織所有元素]可能的重複(http://stackoverflow.com/questions/12086900/reorganize-all-elements-after-hiding-a-element-using-jquery-masonry) – Chango 2013-05-15 14:35:09