From 0f1611d3794e613f1d1ea6cdc11a4e3ed1e722a6 Mon Sep 17 00:00:00 2001 From: Vincent Le Ligeour Date: Wed, 20 Feb 2013 18:39:24 +0100 Subject: [PATCH] fix: unregister live click events 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. --- src/jaysun.1.0.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jaysun.1.0.js b/src/jaysun.1.0.js index 4966741..92a3791 100644 --- a/src/jaysun.1.0.js +++ b/src/jaysun.1.0.js @@ -229,6 +229,7 @@ } + $('.toggle').die('click'); $('.toggle').live('click', function() { if($(this).next().next().is(':visible')) @@ -259,4 +260,4 @@ } -} \ No newline at end of file +}