Forums

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

Home Forums JavaScript Drop down toggle jQuery Re: Drop down toggle jQuery

#92386
davidlab.be
Participant

Here is a simple solution….untested.(meaning live site) Replace your jQuery with this:

 $(document).ready(function() {
$('#containers, #sizes').hide();


$('a#more_cat').click(function(){
$('div#containers').fadeIn(2000);
$('div#sizes').hide();
});

$('a#more_sizes').click(function(){
$('div#sizes').fadeIn(2000);
$('div#containers').hide();
});
});

And then delete the property display:none; from #container, #sizes in your css because we are hiding the same divs with jQuery on page load.