X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=unfold%2Fjs%2Fplugin.js;h=5aa90fac551db6d9bd4e7cdeeb073643a842bfd6;hb=125cb35942f634e42bf1afcbd5da04a5bd67eaca;hp=b03b73751245a3032014523de86feb45cc907cdf;hpb=b22470bd98b5ff7384c4f70017dfee1b99904548;p=myslice.git 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'}); });