Permalink
Browse files

Better cleanup

  • Loading branch information...
1 parent f0f0b6f commit c1471ecd586779edf057a87c16f07c9c1f829202 @kemayo committed Jul 20, 2010
Showing with 4 additions and 3 deletions.
  1. +3 −2 jquery.maphilight.js
  2. +1 −1 jquery.maphilight.min.js
View
@@ -151,6 +151,7 @@
var wrapper = img.parent();
img.insertBefore(wrapper);
wrapper.remove();
+ $(map).unbind('.maphilight').find('area[coords]').unbind('.maphilight');
}
wrap = $('<div></div>').css({
@@ -234,8 +235,8 @@
} else {
$(map).find('area[coords]')
.trigger('alwaysOn.maphilight')
- .mouseover(mouseover)
- .mouseout(function(e) { clear_canvas(canvas); });
+ .bind('mouseover.maphilight', mouseover)
+ .bind('mouseout.maphilight', function(e) { clear_canvas(canvas); });
}
img.before(canvas); // if we put this after, the mouseover events wouldn't fire.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit c1471ec

Please sign in to comment.