I want to show the panel on my page when the page loads. I got this already with a script.
But when the site loads, the panel shows the whole page → The other side of my page scrolls to the right, so I do not see all the content.
So, I added "class =" ui-responsive-panel "to my wrapper.
Now I have the same problem until I press the button that I linked to my panel. This button hides the panel on the first click, and secondly, it shows my panel, and the right content reduces the width (this is my goal).
What do I need to add that this is already done when the page loads?
thanks
EDIT: My code
<div data-role="page" id="page" class="ui-responsive-panel"> <div data-role="panel" id="Panel" data-display="reveal" data-position-fixed="true" data-swipe-close="false" data-dismissible="false" data-theme="none"> Content here </div> <div data-role="header" data-theme="b" data-position="fixed"> <h1>Title</h1> </div> <div data-role="content"> Here my Content which I want to auto scale on page load <script>$(document).on('pagebeforeshow', '#Page', function(){ $( "#Panel" ).panel( "open"); });</script> </div> </div>
source share