Home › Forums › JavaScript › Drop down toggle jQuery › Re: Drop down toggle jQuery
December 10, 2011 at 8:06 am
#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.