I'm trying to create a form that uses accordions for organization using Foundation 6. I want to add inputs and buttons to the accordion title. Normally when the accordion title is clicked it, it toggles its content by sliding. I want to disable this effect, so that if I click the button in the title the content won't toggle, since it's really annoying if it expands and contracts every time I click the button.
I have something like:
$body.on('click', '.button_on_title', function (event) {
// do stuff
});
I've tried event.preventDefault()
and event.stopPropagation()
, and they have no effect. It seems like Foundation 6 is somehow overriding the event stack?
Edit: To clarify, I want to prevent the accordion from opening and closing when clicked, not just remove the sliding animation.