ajaxComplete에서 석조 호출을 감싸서 Ajax가로드 된 후에 발생 시키십시오.
$(document).ajaxComplete(function() {
console.log("Ajax finished"); //remove this if you want, useful for debugging
$(document).ready(function() {
$('#content').masonry({
columnWidth: 260, //change this accordingly
itemSelector: '.item'
});
});
});
그냥 직접이 문제를 해결했습니다.
여기
나은 솔루션 :
{ 손가락 : [{ theight 250 thumbUrl "/ 업로드/엄지
$(document).ready(function() {
$('#admin_content').masonry({
columnWidth: 260,
itemSelector: '.masonry-item',
isAnimated:true,
animationOptions: {
duration: 500,
easing:'swing',
queue :false
}
});
});
$(document).ajaxComplete(function() {
$('#admin_content').masonry('reloadItems').masonry();
});
온라인 샌드 박스가 없으며 jsfiddle이 없습니다. 오류가있는 위치를 말하기가 어렵습니다. 시작을 위해, Masonry는 레이아웃의 요소 넓이를 필요로하므로, Masonry 콜백을 지연시킬 필요가 있습니다. – Systembolaget
나는 지금 그것을 경험하고있다, 당신은 어떤 해결책을 찾았습니까? 리로드 호출과 별도로? –