我正在使用此代码在具有RTL支持的情况下运行Isotope
$.Isotope.prototype._positionAbs = function( x, y ) {
return { right: x, top: y };
};
$('.portfolio-isotope').each(function() {
var layoutMode = $(this).attr('data-layoutmode');
if(!layoutMode || layoutMode === ""){
layoutMode = 'fitRows';
}
$(this).isotope({
transformsEnabled: false,
itemSelector: '.portfolio-element',
layoutMode : layoutMode,
transitionDuration : '0.8s'
});
});
由于某种原因,我让浏览器返回JavaScript错误
Uncaught TypeError: Cannot read property 'prototype' of undefined
可能是什么原因呢?
最佳答案
只是
使用这个选项
isOriginLeft:否
和CSS
.isotope .isotope-item
{
-webkit-transition-property: right, top, -webkit-transform, opacity;
-moz-transition-property: right, top, -moz-transform, opacity;
-ms-transition-property: right, top, -ms-transform, opacity;
-o-transition-property: right, top, -o-transform, opacity;
transition-property: right, top, transform, opacity;
}