view raw
jay stephens jay stephens - 8 months ago 29
CSS Question

Removing .slideDown animation from a dropdown if another dropdown was just clicked

I wasn't entirely sure how to word the question, but I currently have a dropdown which uses jquery toggleSlide, It works fine but If I'm clicking through the dropdown buttons, the animation plays one after another (As expected) I was wondering if there was a way to deactivate the slideToggle to just .show if another dropdown just played the slideDown animation.

The jquery I use for each dropdown

$(function() {

// Dropdown toggle

$(document).click(function(e) {
var target =;
if (!$(target).is('.menu1') && !$(target).parents().is('.menu1')) {

}); Hopefully this gives you an idea of what I'm talking about, dropdown shows exactly what I mean.



You can hide the other menu.

Add hide() method to the following functions. It cancels all animations.

// Dropdown toggle

New fiddle