diff --git a/jquery.rwdImageMaps.js b/jquery.rwdImageMaps.js index c9d7348..6aed5e1 100644 --- a/jquery.rwdImageMaps.js +++ b/jquery.rwdImageMaps.js @@ -27,6 +27,11 @@ w = $that.attr(attrW), h = $that.attr(attrH); + if (!w || !h){ + w = that.naturalWidth; + h = that.naturalHeight; + } + if (!w || !h) { var temp = new Image(); temp.src = $that.attr('src'); @@ -64,4 +69,4 @@ return this; }; -})(jQuery); \ No newline at end of file +})(jQuery);