From 4bcd816d77291e6cfb9a3755d930792accf02ae7 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 31 May 2014 14:34:31 +0200 Subject: [PATCH] Animation on dropdown menus Fix #48 --- public/js/vroom.js | 8 ++++++++ templates/default/join.html.ep | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index c49516f..9e23548 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -9,6 +9,14 @@ $.notify.defaults( { globalPosition: 'bottom left' } ); // Enable tooltip on required elements $('.help').tooltip({container: 'body'}); +// Animation on dropdown menus +$('.dropdown').on('show.bs.dropdown', function(e){ + $(this).find('.dropdown-menu').first().stop(true, true).slideDown(150); +}); +$('.dropdown').on('hide.bs.dropdown', function(e){ + $(this).find('.dropdown-menu').first().stop(true, true).slideUp(150); +}); + // Strings we need translated var locale = { ERROR_MAIL_INVALID: '', diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index a9ac0e8..a9ddc3f 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -55,7 +55,7 @@