Works wrong when initial image size is set in percents
I have image with width=100% and height=100% Script doesn't recognize such values. I've solved that problem by removing these strings and rewriting following condition:
w = $that.attr(attrW), h = $that.attr(attrH);
% values aren't valid values for img attributes. They need to be integer pixels
I thought you're crazy, but according to HTML5 spec you have right. But anyway it means your script doesn't support HTML4. I think you should notice that in the docs or just fix it in order to save time for the following generations :)
The problem is that it uses those dimensions to perform the calculations
Yes, I read your code. You have a check "if(!w || !h)". You can consider percent values as invalid as well or just all non-numeric values. That will give 100% guarantee that images with wrong width/height attributes will work anyway.
I'll consider it. Thanks
Thank you for your work :)