JQuery mobile, is there a way to prevent the SELECT box from becoming a dialog page?

邮差的信 提交于 2019-12-12 02:48:25

问题


SO I have a select box that I fill dynamically. I discovered that once the SELECT gets longer than the page, it automatically becomes a dialog listview.... which is TERRIBLE!

When this happens, the page refreshes when the dialog is closed and my whole page starts over....

Has anyone experienced that and do you know how to shut it off?

Thanks! Todd


回答1:


You could use the native look and feel?

  • http://jquerymobile.com/demos/1.0.1/docs/forms/forms-all-native.html

Native form elements & buttons

Although the framework automatically enhances form elements and buttons into touch input optimized controls to streamline development, it's easy to tell jQuery Mobile to leave these elements alone so the standard, native control can be used instead.

Adding the data-role="none" attribute to any form or button element tells the framework to not apply any enhanced styles or scripting. The examples below all have this attribute in place to demonstrate the effect. You may need to write custom styles to lay out your form controls because we try to leave all the default styling intact.



来源:https://stackoverflow.com/questions/9028438/jquery-mobile-is-there-a-way-to-prevent-the-select-box-from-becoming-a-dialog-p

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!