Hey there,
Looking for a code check. I have three buttons, each designated to expand a particular section. I would like for an opened section to collapse when I open another. Currently using the code below.
jQuery(document).ready(function($){
$('#one').slideToggle(0);
$('#one-trigger-button').on('touchend click', function(){
$(".section-expandable1").not("#one").slideUp();
$('#one').slideToggle( "slow" );
});
});
jQuery(document).ready(function($){
$('#two').slideToggle(0);
$('#two-trigger-button').on('touchend click', function(){
$(".section-expandable2").not("#two").slideUp();
$('#two').slideToggle( "slow" );
});
});
jQuery(document).ready(function($){
$('#three').slideToggle(0);
$('#three-trigger-button').on('touchend click', function(){
$(".section-expandable3").not("#three").slideUp();
$('#three').slideToggle( "slow" );
});
});