maphilight
maphilight copied to clipboard
Bug in safari
The width and height of the wrapper needs to be set to offsetWidth and offsetHeight.
wrap = $('<div></div>').css({ display:'block', backgroundImage:'url("'+this.src+'")', backgroundSize:'contain', position:'relative', padding:0, width:this.offsetWidth, height:this.offsetHeight });