简体   繁体   English

如何使用jQuery mobile增加面板的宽度?

[英]How can I increase the width of a panel using jQuery mobile?

<div><a href="#overlayPanel">
    search</a>
</div>

<div data-role="panel"
     id="overlayPanel" 
     data-theme="a"  
     data-display="overlay"                                                 
     data-position="right" style="width:100%">
         <h2>Overlay Panel</h2> 
         <a href="#pageone" data-rel="close">
             Close panel
         </a>
</div>

I tried above code using jquery mobiles, its increasing the size but its closing automatically when we click any where in the panel 我使用jquery mobiles尝试了上面的代码,它增加了大小,但是当我们单击面板中的任何位置时它会自动关闭

Set data-dismissible property to false in your panel. 在面板中将data-dismissible属性设置为false Like this 像这样

<div data-role="panel" id="myPanel" data-dismissible="false" style="width:100%"> 

Refer this Fiddle Demo 请参阅此小提琴演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM