Skip to content

Commit

Permalink
fix a stupid mistake
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Coulon <victa.talawa@gmail.com>
  • Loading branch information
Victa committed Dec 10, 2011
1 parent 68998af commit dcd398a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Expand Up @@ -33,13 +33,15 @@
$box.delegate('[href="#open"]', 'click', function(e) {
e.preventDefault();
var $this = $(this);
($this, $tooltip).toggleClass('active');
$this.toggleClass('active');
$tooltip.toggleClass('active');

if($tooltip.hasClass('active')) {

$(document).bind('click.closetooltip', function(e) {
if($(e.target).parents('.box').length === 0) {
($this, $tooltip).removeClass('active');
$this.removeClass('active');
$tooltip.removeClass('active');
$(document).unbind('click.closetooltip');
}
});
Expand Down

0 comments on commit dcd398a

Please sign in to comment.