kemayo / maphilight

jQuery plugin that adds highlighting to image maps
http://davidlynch.org/projects/maphilight/docs/
MIT License
491 stars 278 forks source link

Bug in safari #87

Open liekeheijne opened 5 years ago

liekeheijne commented 5 years ago

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