Is there a way to make my checkout sections fold up once instead of folding up and down when using toggle?
I have created a test case in jsfiddle: (no styling done yet!) http://jsfiddle.net/Wd8Ty/
The code responsible for the behavior is located in AMLRWDCustom.js:
$('.checkoutsteptitle').addClass('down').next('.checkoutstep').fadeIn()
$('.checkoutsteptitle').on('click', function () {
$("select, input:checkbox, input:radio, input:file").css('display', 'block');
$(this).toggleClass('down').next('.checkoutstep').slideToggle()
});
I just want the section to fold up once and then fold back down if clicked. Any suggestions on how to achieve this? Thanks!