igorlino / elevatezoom-plus

Enhanced elevateZoom - A jQuery image zoom plugin
http://igorlino.github.io/elevatezoom-plus/
MIT License
162 stars 78 forks source link

Tint - "max-width:auto" is not working #90

Open ghost opened 7 years ago

ghost commented 7 years ago
self.zoomTintImage = $('<img style="' +
                    'position: absolute;' +
                    'top: 0px;' +
                    'left: 0px;' +
                    'height: ' + self.nzHeight + 'px;' +
                    'width: ' + self.nzWidth + 'px; "' +           // <--- quotation mark should be in the next line
                    'max-width: none; ' +
                    'src="' + self.$elem.attr('src') + '">')      
                        .appendTo(self.zoomLens)
                        .click(function () {
                            self.$elem.trigger('click');
                        });
igorlino commented 6 years ago

nice eyes 👍

igorlino commented 6 years ago

I think you have a older version of the plugin. Could you cross-check your issue against the latest code?

The newer version looks like this:

//if tint enabled - set an image to show over the tint

                    self.zoomTintImage = $('<img src="' + self.$elem.attr('src') + '">')
                        .css({
                            position: 'absolute',
                            top: 0,
                            left: 0,
                            height: self.nzHeight,
                            width: self.nzWidth,
                            maxWidth: 'none'
                        })
                        .appendTo(self.zoomLens)
                        .click(function () {
                            self.$elem.trigger('click');
                        });