Skip to content

Commit

Permalink
[bookmarklet] fix color restoration on mouse out
Browse files Browse the repository at this point in the history
if we got multiple mouseenter-events (was happening sometimes), it was
possible that the oldbg helper was set to the TA green background at
which point it was impossible for that off() function to restore the
original background
  • Loading branch information
pilif committed Jun 25, 2010
1 parent 1596309 commit b6fded2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/bookmarklet.js
Expand Up @@ -47,7 +47,9 @@

$('input[type=text]').live('mouseenter.ta', function(){
var el = $(this);
el[0].oldbg = el.css('background-color');

if (!el[0].oldbg)
el[0].oldbg = el.css('background-color');
el
.css('background-color', '#72a100')
.addClass('__ta_highlight');
Expand Down

0 comments on commit b6fded2

Please sign in to comment.