Can I completely close/leave via js api?

Hello, I’m calling jitsi meet via js external API. My idea is to able to get into different meetings (after finishing current one), but have problems “closing” jitsi. To do so, I have an additional button that hides the div that contains jitsi window, but if I call my function to open jitsi, instead of “join room” I get the 8x8 room ad.