Brian Evans
Posts: 0
Joined: Mon Feb 03, 2014 9:28 pm

How to check if panel is open so I can close it?

I've got a button that opens the panel just fine and in the browser testing clicking the same button closes the panel. On my Android in the IO Tester clicking the button only opens the panel, it does not close it.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to check if panel is open so I can close it?

Hello!

Opened panel has ui-panel-open class, so you can check preAppery("panelName").hasClass("ui-panel-open")/preor you can check css property visibility. For opened panel it's visible, for closed hidden. For example preAppery("panelName").css("visibility") === "visible"/pre

Jitendra Bhagat
Posts: 0
Joined: Tue Apr 29, 2014 8:56 am

How to check if panel is open so I can close it?

Hi Maryna,

On pressing Android device's Back Button , I want to close the opened panel.
so the code below works .
code
//Need to check if panel is open
if( ($(".ui-panel").hasClass("ui-panel-open"))=== true ){
ShopPanel.close();
}
/code
when I change the screen and come back to the ShopScreen where I have this code and panel is opened but when I press BackButton , it do not close the panel.

Please suggest what to do ?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to check if panel is open so I can close it?

Hi Jitendra,

You would need to add the following code on Page Show event for the page with Panel:preApperyio("panelName").panel("close");/pre

Jitendra Bhagat
Posts: 0
Joined: Tue Apr 29, 2014 8:56 am

How to check if panel is open so I can close it?

What is the difference between Appery("panelName") and Apperyio("panelName") ?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to check if panel is open so I can close it?

Hello Jitendra,

There is not any difference. Apperyio and Appery - different names for the same function.

Return to “Issues”