0

I use JDzoom (https://donatstudios.com/JDZoom) but I have error enter image description here

on-line: var elmSize = $(elm).getSize();

var JDZoom = new Class({

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();
            });
        }

I read: 1 getSize() giving me errors 2 https://github.com/magento/magento2/issues/7730 3 How to get the size of a JavaScript object?

But not find answer. Anyone have idea?

kalehmann
  • 4,123
  • 6
  • 18
  • 34
kamillimi
  • 39
  • 7
  • How do you load your libraries? – Justinas Sep 06 '18 at 14:09
  • In header all code, becouse I code this on SAAS shop :( You think I need import code from another file? – kamillimi Sep 06 '18 at 15:51
  • Seems like you do not load your JDZoom lib properly/at all. Or maybe your JDZoom does not have `getSize` function? Please note, that your link to `getSize() giving me errors` is in JAVA. And Java entirely different than JavaScript – Justinas Sep 07 '18 at 07:14

0 Answers0