Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery delay() and toggle() Re: jQuery delay() and toggle()

#69121
GreatPotato
Member

Figured it out… Basically just built my own toggle by test a variable to see if it was even when an element is clicked…

var delay = 0;

$(".form h3").click(function() {
delay++;

if(delay%2 == 0) {
$(this).siblings(".rightcol").delay(500).slideUp();
$(this).siblings(".leftcol").fadeOut();
} else {
$(this).siblings(".rightcol").slideDown();
$(this).siblings(".leftcol").delay(500).fadeIn();
}
});