0
I installed Swagger for software documentation but would like to change the preview of my template. I managed to close Collapse when loading the page forcing a javascript when starting, but it got a small bug, because I have to click twice to work.
I did something like this:
$(document).ready(function() {
$('.opblock-tag-section').find('div').slideUp();
$('.opblock-tag-section').click(function(){
$(this).find('div').slideToggle();
});
});
I did it using, "display", "None" in the div too, and then I sent a "block" to show it again. Even so it gives a lock and only works in the second click. Does it have something to do with the json loading of my api in Swagger? I wondered that, because it mounts the interface via the json call, and I’m changing the behavior of Collapse after it’s loaded.