jqueryhtmlcssjquery-mobilejquery-mobile-grid

How to make Jquery Mobile Grids mapped to different screens


I have a Jquery mobile grid - ui-grid-a in a screen where I have to show a .html screen in ui-block-a and another .html screen in ui-block-b . When I tried loading the screens, it only shows an empty screen with ajax loader progress bar. Below is my code which I tried.

<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
        <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
    </head>

    <body>
        <div data-role="page" id="pageone">
          <div data-role="header">
            <h1>Flexible grid</h1>
          </div>

          <div data-role="main" class="ui-content">
            <div class="ui-grid-a">
              <div class="ui-block-a" id="grid-one"></div>
              <div class="ui-block-b" id="grid-two"></div>
            </div>
          </div>
        </div> 

        <script>
            $(document).ready(function(e){
                $('#grid-one').load('form_demo.html');
                $('#grid-two').load('list_demo.html');
            });
        </script>
    </body>
</html>

Solution

  • I got solved myself. I added an Iframe which points to the .html page. Now I am having 2 .html page inside a base .html page.