Best HTML5 Mobile App Frameworks: jQuery Mobile

Written by on April 7, 2015

Best HTML5 Mobile App Frameworks: jQuery Mobile

Welcome to my blog, if there’s something I didn’t cover feel free to leave me a comment below and I will respond as soon as humanly possible. Topic of today’s article is an in-depth review of jQuery Mobile framework.

Note: If this tutorial was helpful, you need further clarification, something is not working or you have a request for another Ionic post? Furthermore, leave me a comment below if you don't like something about this blog, if something is bugging you, don't like how I'm doing stuff here. Feel free to comment below, subscribe to my blog, mail me to Thanks and have a nice day!

GitHub Repo


This is Part 3 in a multipart series called: “Best HTML5 Mobile App Frameworks”

Note: I have no intention of stopping writing after I review Kendo UI. If you want me to review a framework you like or know about just write me a comment below.

What Is jQuery Mobile Framework?

jQuery Mobile is an HTML5-based user interface system designed to make responsive websites and apps that are accessible on all smartphone, tablet and desktop devices. Unlike Sencha Touch which is built to work only on web kit browsers (this is no longer true), jQuery Mobile will run on pretty much anything as long it supports HTML5 standard. It doesn’t matter are you running it on a Windows, Mac OS, Android or iOS, it will run just fine and that makes it appealing to a broader specter of users. This is also the oldest framework reviewed here, initially it was released during 2000.

Unlike frameworks like Ionic or Sencha Touch, jQuery Mobile is HTML5 markup based framework, whereas much job is done through HTML5 markup (mostly through data attributes). Background JavaScript is handled with jQuery though MVC (or MVVC) is not supported out of the box (Backbone can be used after some major tweaking).

Unlike Ionic and, jQuery Mobile is both mobile and desktop framework. HTML5 markup is heavily styled using CSS3, which can cause some performance problems, especially if UI is overcrowded. Unfortunately, you will need to sacrifice this functionality in order to run Backbone with jQuery Mobile.

Probably biggest jQuery Mobile quality (sometimes downside) is AJAX driver page and navigation handling. AJAX is used to load application content into the DOM (non-necessary content is removed from the DOM accordingly, to prevent large memory footprint).

It should be used for mobile website development, sometimes even for desktop website development.

What jQuery Mobile is not?

jQuery Mobile is not a mobile version of jQuery, think of it as an additional layer (or extension) around jQuery (just like jQuery UI).

If you prefer JavaScript approach then this framework is not for you. You will still need to use jQuery (or vanilla JavaScript) but not nearly enough like in the case of Sencha Touch.

If possible it should not be used for hybrid mobile development, so don’t expect it to do wonders (this is not a case when used properly, which requires a lot of digging and learning). Once upon the time jQuery Mobile + PhoneGap combination almost killed PhoneGap wrapper framework (read more about it here). Nothing changed since that time, jQuery Mobile will still perform purely if used improperly (read one of my previous articles if you want to find out how to avoid this).

Main features

  • Open-source and free
  • Built around jQuery (Can also be used with Backbone)
  • Compatible with all major mobile platforms as well as all major desktop browsers
  • Theming framework that allows a creation of custom themes
  • Limited dependencies and lightweight to optimize speed (80%-90% will fail in this)
  • HTML5-driven configuration for laying out pages with minimal scripting
  • AJAX based navigation and page handling
  • Touch-optimized UI widgets
  • Large 3rd party support
  • Supports PhoneGap as native app wrapper

Code example


<!DOCTYPE html>

  <title>jQM Complex Demo</title>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi" />
  <link rel="stylesheet" href="" />
  <link rel="stylesheet" href="" />
  <link rel="stylesheet" href="" />
  <link rel="stylesheet" href="style.css">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
  <script src="script.js"></script>

  <div data-role="page" id="home">
    <div data-theme="a" data-role="header">
            Movie List
    <div data-role="content">
      <div class="example-wrapper" data-iscroll>
        <ul data-role="listview" id="movie-list" data-theme="a">

    <div data-theme="a" data-role="footer">
      <h1>Copyright 2015</h1>
  <div data-role="page" id="headline">
    <div data-theme="a" data-role="header">
      <a href="#home" class="ui-btn-left" data-transition="slide" data-direction="reverse">Back</a> 
            Movie Info
    <div data-role="content">
      <ul data-role="listview" id="movie-data" data-theme="a">





$(document).on('pageinit', '#home', function(){      
    var url = '',
        mode = 'search/movie?query=',
        movieName = '&query='+encodeURI('Batman'),        
        key = '&api_key=470fd2ec8853e25d2f8d86f685d2270e';        
        url: url + mode + key + movieName ,
        dataType: "jsonp",
        async: true,
        success: function (result) {
        error: function (request,error) {
            alert('Network error has occurred please try again!');

$(document).on('pagebeforeshow', '#headline', function(){      
    $.each(movieInfo.result, function(i, row) {
        if( == {
            $('#movie-data').append('<li><img src="'+row.poster_path+'"></li>');
            $('#movie-data').append('<li>Title: '+row.original_title+'</li>');
            $('#movie-data').append('<li>Release date'+row.release_date+'</li>');
            $('#movie-data').append('<li>Popularity : '+row.popularity+'</li>');   
            $('#movie-data').append('<li>Popularity : '+row.vote_average+'</li>');             

$(document).on('pageshow', '#headline', function(){      
    benchmark.end = new Date().getTime();

$(document).on('vclick', '#movie-list li a', function(){  
    benchmark.start = new Date().getTime(); = $(this).attr('data-id');
    $.mobile.changePage( "#headline", { transition: "slide", changeHash: false });

var movieInfo = {
    id : null,
    result : null

var ajax = {  
        movieInfo.result = result.results;
        $.each(result.results, function(i, row) {
            $('#movie-list').append('<li><a href="" data-id="' + + '"><img src="'+row.poster_path+'"/><h3>' + row.title + '</h3><p>' + row.vote_average + '/10</p></a></li>');

var benchmark = {
  start : null,
  end : null, 
  checkTimeDifference:function() {
    var time = (this.end - this.start) / 1000;
    console.log('Execution time: ' + time + ' seconds');


.ui-content {
    padding: 0 !important;
.ui-listview {
    margin: 0 !important;
.example-wrapper, .example-wrapper div.iscroll-scroller {
    width: 100% !important;



Working embedded example:

Warning: If you can't see a working example that probably means is down ... again.

Continue Reading


Leave a Reply