Skip to main content

jQuery Mobile-simple html example

jQuery Mobile stores the HTML markup for multiple pages in a single file and uses JavaScript to manipulate the file’s document object model (DOM) to display only the first page. Tapping a link hides the page and replaces it with another. But jQuery Mobile does much more. It’s a sophisticated JavaScript and CSS frameworkdesigned to build websites that act and feel like mobile apps

Eg:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>Page content goes here.</p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>

This is the basic code for creating a html page for mobile. It will look like this on an iPhone and other mobile devices.

Popular posts from this blog

Dot Net FrameWork

The .NET Framework has two main components: the 1)Common Language Runtime (CLR) and the 2).NET Framework class library. The .NET Framework provides a Runtime environment called the Common Language Runtime or (CLR) that handles the execution of the code and provides useful services for the implementation of the application. CLR: The Runtime can be considered an agent that manages code at execution time. Thus providing core services such as memory management, thread management, and remoting. Also incorporating strict type safety, security and robustness. The Common Language Runtime (CLR) is the virtual machine component of the .NET framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling. Class Library: The class library is a comprehensive collection of reusable types that you can use to develop traditional command-line, WinForm (graphical user interface) appli...

SQL Difference between Union & Union All

SQL Difference between Union & Union All The union and union all operators allow you to combine multiple data sets. The difference between the two is that union sorts the combined set and removes duplicates while union all does not. With union all, the number of rows in the final data set will always equal the sum of the number of rows in the sets being combined.[Learning SQL By Alan Beaulieu] When using the UNION command all selected columns need to be of the same data type. For example : X Y UNION UNION ALL A B A A A B B A B A - B - - - B - - - B - - - A Union all is faster than union, union's duplicate elimination requires a sorting operation, which takes time.

Accept only numbers in an textbox.

This javascript function is used to make an text-box to accept number alone. JavaScript: function isNumberKey(evt)                                          {                                             var charCode = (evt.which) ? evt.which : event.keyCode                                             if (charCode > 31 && (charCode < 48 || charCode > 57))                        ...