maphilight
maphilight copied to clipboard
don't run if <map> has no <area>
In one of my projects
Maybe add some default option like 'emptyMap': true
for backward compatibility, so it could be disabled on startup if desired.
Possible solution:
// if map has no descendant areas and option is set to false
if (!map.has('area').length && !option.emptyMap) {
return
}
somewhere near line 235 of http://davidlynch.org/projects/maphilight/jquery.maphilight.js