JQueryMobile panel - as always show on wide pages

I have a panel, and I try to always show the panel when the window is wide. I don’t need to have a close button - just always show it for wider windows.

jQuery Mobile Responsive Panel Dismiss issue helped along with others, but no luck. I can make everything almost work, but every time I go to a new page, the panel animates, which looks weird.

Now I am using a fixed div on the left, which is not a jquerymobile panel. I can do it from the server. But it seems like a lot of effort is needed to just keep the panel open.

Any clues?

+6
source share
2 answers

You tried something like this:

$(document).on("pagebeforeshow", function( event, data ) { $('#my-panel').panel("open"); }) 
0
source

I also encounter such a problem. Here is my solution: add the following javascript to your header:

 $(document).on("pagebeforeshow", function( event, data ) { $('#my-panel').panel("open"); }) 

and in the panel add two attributes: data-swipe-close = "false", data-dismissible = "false"

then the panel will always be displayed in your html

0
source

Source: https://habr.com/ru/post/945187/


All Articles