smoother/slide-based hide and show of plugins
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 6 Mar 2013 14:58:48 +0000 (15:58 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 6 Mar 2013 14:58:48 +0000 (15:58 +0100)
engine/static/js/plugin_init.js

index c5a9de8..53f0aaf 100644 (file)
@@ -6,12 +6,12 @@ $(document).ready(function() {
        $(this).click(function () { 
            var plugin='#'+$(this).attr('id').replace('hide-',''); 
            var show='#'+$(this).attr('id').replace('hide-','show-'); 
-           jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();});
+           $(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-'); 
-           jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();});
+           $(plugin).slideDown(); $(hide).show(); $(this).hide();});
        })
     })