0
if (Meteor.isClient) {
Template.articles.rendered = function() {
var container = $('.articles');
var antiIso = $(container.find(".article:not(.isotope-item)"));
if(container.children().length > 0) {
if (!container.hasClass("isotope")) {
console.log(container);
console.log(container.hasClass("isotope"));
container.isotope({
// options
itemSelector : '.article',
layoutMode : 'fitRows'
});
} else if (container.hasClass("isotope") && antiIso.length > 0) {
console.log("Updating Isos");
container.isotope('addItems', antiIso, function() {
container.isotope();
});
}
}
}
콘솔 출력 :동위 원소, 유성, hasClass가 false를 반환합니까?
<div class="articles isotope" style="position: relative; overflow: hidden; height: 281px; ">…</div>
false
내가 여기 노골적으로 뭔가를 분명 실종? 내 이해 컨테이너에 반드시 동위 원소 클래스가 있어야합니까?