I installed Swagger for documentation of a software but would like to change the view of my template. I was able to close the collapse when loading the page by forcing a javascript to start, but it got a small bug because I have to double-click it 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 made use of, "display", "none" in the div too, and then I would like to send a "block" to show it again. Even so it fights and only works on the second click. Does it have anything to do with loading json from my api on swagger? I questioned this because it mounts the interface through the json call, and I'm changing the behavior of the collapse after it loads.