Todd Vance
Todd Vance

Reputation: 4711

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

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

Upvotes: 0

Views: 824

Answers (1)

Phill Pafford
Phill Pafford

Reputation: 85298

You could use the native look and feel?

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.

Upvotes: 2

Related Questions