Hi, I’ve put together a home page for a client using the collapsing section JS code referred to here:
and here:
I’m repeating the code below for each section, which works perfectly on desktop (obviously using the class .section-expandable for the collapsing sections and unique ids for each of the trigger buttons). However, on a mobile device the sections expand and then immediately close again, any idea what’s happening here and how to prevent/fix it?
jQuery(document).ready(function($){
$(’#foxer’).slideToggle(0);
$(’#foxer-trigger-button’).on(‘touchend click’, function(){
$(".section-expandable").not("#foxer").slideUp();
$(’#foxer’).slideToggle( “slow” );
});
});
Thanks in advance.