Thursday, February 2, 2012

jQuery Mobile - $(document).ready()

$(document).ready(handle) Specify a function (handle) to execute as soon as the DOM is loaded.

Example of using $(document).ready() in jQuery Mobile.

jQuery Mobile - $(document).ready()

<!doctype html>
<title>Mobile-Web-App: jQuery Mobile .ready()</title>
<meta charset="utf-8"></meta>
<meta name = "viewport" content = "width = device-width, height = device-height" />

<link rel="stylesheet" href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>

$(document).ready(function () {
alert("Page Ready");


<div data-role="page" id="home">
<div data-role="header">
<h3>jQuery Mobile .ready()</h3>

<div data-role="content">
<p>Specify a function to execute when the DOM is fully loaded.</p>

<div data-role="footer">
<h4><a href=""></a></h4>



No comments:

Post a Comment