Skip to content

Commit

Permalink
fix: unregister live click events
Browse files Browse the repository at this point in the history
When applying twice the formater the live events conflict. This prevent it by
removing it before creating the new one. This patch broke the capability of
applying the formater with collapse on two different objects in the same page.
  • Loading branch information
Vincent Le Ligeour committed Feb 20, 2013
1 parent 007565d commit 0f1611d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jaysun.1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@

}

$('.toggle').die('click');
$('.toggle').live('click', function() {

if($(this).next().next().is(':visible'))
Expand Down Expand Up @@ -259,4 +260,4 @@

}

}
}

0 comments on commit 0f1611d

Please sign in to comment.