JQuery Mobile: Touch Optimized Web Framework for Smartphones & Tablets
A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.Use reference of these:
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css" />
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script>
These Script is necessary for using the controls or features of JQuery Mobile.
In thebody, a div with adata-roleofpageis the wrapper used to delineate a page, and the header bar (data-role="header") and content region (data-role="content") are added inside to create a basic page (these are both optional). Thesedata-attributes are HTML5 attributes used throughout jQuery Mobile to transform basic markup into an enhanced and styled widget.
<!DOCTYPE html> <html> <head> <title>My Page</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css" /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>My Title</h1> </div><!-- /header --> <div data-role="content"> <p>Hello world</p> </div><!-- /content --> </div><!-- /page --> </body> </html>Make a listview
jQuery Mobile includes a diverse set of common listviews that are coded as lists with adata-role="listview"added.Add a dynamic search filter with thedata-filter="true"attributes.<ul data-role="listview" data-inset="true" data-filter="true"> <li><a href="#">Acura</a></li> <li><a href="#">Audi</a></li> <li><a href="#">BMW</a></li> <li><a href="#">Cadillac</a></li> <li><a href="#">Ferrari</a></li> </ul>Add a slider
<form> <label for="slider-0">Input slider:</label> <input type="range" name="slider" id="slider-0" value="25" min="0" max="100" /> </form>Make a button
Just start with a link and add adata-role="button"attribute to it. You can add an icon with thedata-iconattribute and optionally set its position with thedata-iconposattribute.Theme swatches
Just add adata-theme="e"attribute to any of the widgets on this page<a href="#" data-role="button" data-icon="star" data-theme="a">Button</a>Click Below Links...
Page transitions
JQuery Methods
Methods







No comments:
Post a Comment