From 125cb35942f634e42bf1afcbd5da04a5bd67eaca Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 25 Mar 2013 09:07:58 +0100 Subject: [PATCH] keep it simple --- unfold/js/plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unfold/js/plugin.js b/unfold/js/plugin.js index b03b7375..5aa90fac 100644 --- a/unfold/js/plugin.js +++ b/unfold/js/plugin.js @@ -22,14 +22,14 @@ var plugin = { init_all_plugins: function() { $('.plugin-hide').each(function() { $(this).click(function () { - var plugin='#'+$(this).attr('id').replace('hide-',''); - var show='#'+$(this).attr('id').replace('hide-','show-'); + var plugin='#'+this.id.replace('hide-',''); + var show='#'+this.id.replace('hide-','show-'); $(plugin).slideUp(); $(show).show(); $(this).hide();}); }); $('.plugin-show').each(function() { $(this).click(function () { - var plugin='#'+$(this).attr('id').replace('show-',''); - var hide='#'+$(this).attr('id').replace('show-','hide-'); + var plugin='#'+this.id.replace('show-',''); + var hide='#'+this.id.replace('show-','hide-'); $(plugin).slideDown(); $(hide).show(); $(this).hide();}); }); $('.plugin-tooltip').each(function(){ $(this).tooltip({'selector':'','placement':'right'}); }); -- 2.43.0