Recently I started using PhoneGap for developing mobile apps. jQuery mobile and PhoneGap is pretty cool. Today I will show you how to use jQuery mobile and PhoneGap together in your application. Below is an example of jQuery mobile and PhoneGap.
Fews days ago I tried titanium it’s also quite good but for building UI needs lots of coding. But with PhoneGap and jQuery mobile it’s too much easy for me.
Here my code snippet for this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <script charset="utf-8" type="text/javascript" src="js/phonegap.0.9.5.1.min.js"></script><script charset="utf-8" type="text/javascript" src="js/phonegap.0.9.5.1.js"></script> <script charset="utf-8" type="text/javascript" src="js/jquery-1.6.1.min.js"></script><script charset="utf-8" type="text/javascript" src="js/jquery.mobile.min.js"></script> <script charset="utf-8" type="text/javascript">// <![CDATA[ function onBodyLoad() { document.addEventListener("deviceready",onDeviceReady,false); } // ]]></script> <div data-role="page"> <div data-role="header"> <h1>Page Title</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true"> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> <li>List item 4</li> <li>List item 5</li> </ul> </div> <div data-role="footer"> <h4>Page Footer</h4> </div> </div> |
All you need to know how to use jQuery mobile. Here in my code I just link jquery mobile js and css files and use jQuery mobile page structure. Code is pretty simple and self descriptive I think. Isn’t it cool?
Related posts:
- jQuery datepicker’s date conversion similar to PHP time() function.
- Get started with Zend Framework.
2 Responses to “Get started with PhoneGap”









It looks pretty cool!!! Could you send me the css that you did?
It’s nothing all you need is just download the jquery mobile and follow the markup convention. I didn’t wrote any css it’s all about jquery mobile