我将以下脚本与同位素结合使用但是我想出了错误$ elem.attr。我真的不知道我哪里出错了
var $container = $('.projects').isotope({
itemSelector: '.panel',
masonry: {
columnWidth: 0
},
getSortData: {
responsive: function($elem) {
return parseInt($elem.attr('data-category-responsive'), 10);
},
ecommerce: function($elem) {
return parseInt($elem.attr('data-category-ecommerce'), 10);
},
brochure: function($elem) {
return parseInt($elem.attr('data-category-brochure'), 10);
}
}
});
任何帮助都会深深感激,谢谢你