Reputation: 16793
Is there a way to return false/preventDefault before the hide
event for the collapse plugin?
E.g I want to do something like this:
$(".collapse").on('hide', function(e){
if($(this).hasClass("in"))
e.preventDefault();
});
This simple example: http://jsfiddle.net/ujgSC/4/ with an accordion, I want to prevent the user from closing all of the accordions by clicking the same item twice.
Upvotes: 0
Views: 93