How to close panel from JS?

I have this HTML:

<a href="#" onclick="closepanel();" class="button">Close Right Panel</a>

and JS looks like this:

function      closepanel(){
  if(app.panel.right.opened===true){
    app.panel.close('right',true);
  }
}

why is panel not closed?

Anybody, please… how to close panel for JS?

Looks like your right panel opened by breakpoint. I can’t be closed in this case, unset rightBreakpoint app parameter to be able to open/close it http://framework7.io/docs/panel.html#panel-app-parameters

1 Like

Great, thank you so much.