Pages

Subscribe:

Ads 468x60px

Monday, March 12, 2012

how to use Select menu in jquery mobile

In this Jquery web programming tutorial we will learn that how we can user select menu in our jquery mobile application Select menus are one of the more heavily progressively enhanced elements in the jQuery
Mobile library. jQuery Mobile can either attempt to use the platform’s native select
widget, or it can produce a custom styled select menu.<br />

By default, jQuery Mobile will attempt to use the native select widget. You don’t need
to do anything, just create your select element with its options. To force jQuery Mobile
to create a custom styled select menu, apply the data-native-menu="false" attribute to
the select element,

<section id="page1" data-role="page">
<header data-role="header"><h1>jQuery Mobile</h1></header>
<div class="content" data-role="content">
<h3>Native Select Menu Demonstration</h3>
<form id="myform" action="formprocessor.php" method="post">
<div data-role="fieldcontain">
<label for="select-restaurants">Select Your Restaurants:</label>
<select id="select-restaurants" name="select-restaurants">
<option value="lecentral">Le Central</option>
<option value="bistrovandome">Bistro Vandome</option>
<option value="antoines">Antoine's</option>
</select>
</div>
</form>
</div>
<footer data-role="footer"><h1>O'Reilly</h1></footer>
</section>

No comments:

Post a Comment