2013-01-11 2 views
0

isotope.js를 사용하여 간단한 CMS에 이미지를 표시하고 이미지가 삭제되면 목록에서 이미지가 제거됩니다. 레이아웃 방법 :isotope.js 목록의 첫 번째 항목을 제거 할 때 reLayout 메서드가 작동하지 않습니다.

$('.item').on('click',function(){ 
     $(this).remove(); 
     $('ul').isotope('reLayout'); 
    }); 

이 방법은 목록의 첫 번째 항목을 제외한 모든 항목에 적용됩니다.

http://jsfiddle.net/FgVLV/2/

사람이 여기 좀 도와 수 :

여기 문제를 복제 한? 나는 내 삶을 위해 그것을 이해할 수 없다!

답변

0
//#container_+id is container element 
$obj = $('#container_'+id); //VERY IMPORTANT! 

$('#container_'+id).animate({ 
    opacity: 0, 
    height: 'toggle'     
}, 1000, function() { 
    elem_isotope.isotope('remove', $obj); 
    $("#container_" + id).remove(); 
    $.when($("#container_" + id).remove()).then(elem_isotope.isotope('reLayout')); 

}); 
: 여기를해야합니다 당신의 미래 명에 대한 설명서입니다