我使用JDzoom(https://donatstudios.com/JDZoom),但出现错误
在线:var elmSize = $(elm).getSize();
var JDZoom =新类({
Implements: [Options],
Images: [],
options: {
'selector': 'a[rel=jdzoom]',
'classes': {
placeholder : 'jdz_img',
looking_glass:'jdz_looking_glass',
magnified: 'jdz_magnified'
},
'cancel_click' : true,
'magnified_pos': 'float'
},
initialize: function(options) {
this.setOptions(options);
this.Images = $$( this.options.selector + ' img' );
var that = this;
this.Images.each(function(elm, i){
var elmSize = $(elm).getSize();
var parent_a = elm.getParent('a');
var lg_href = parent_a.get('href');
parent_a.setStyles({'position':'relative','display':'block'});
var rel_pos = parent_a.getPosition( elm );
if( that.options.cancel_click ) {
parent_a.addEvent('click', function(e){
e.preventDefault();
});
}
我读到: 1 getSize() giving me errors 2 https://github.com/magento/magento2/issues/7730 3 How to get the size of a JavaScript object?
但找不到答案。有人知道吗?