0

I have a simple local jQuery mobile page copied from a tutorial of w3schools and it is running perfectly in Mozilla but not on Chrome. It keeps showing a loader.

Same page works just fine after uploading on server. I have tried shuffling CDN position but no luck.

Please help I am stuck :(

Here is my code copy and save this with .html extension and try to run on chrome locally, you will know where I am stuck.

<!DOCTYPE html>
<html>
<head>
  <!-- Include meta tag to ensure proper rendering and touch zooming -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Include jQuery Mobile stylesheets -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <!-- Include the jQuery library -->
  <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <!-- Include the jQuery Mobile library -->
  <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>Insert Page Title Here</h1>
  </div>

  <div data-role="main" class="ui-content">
    <p>Insert Content Here</p>
  </div>

  <div data-role="footer">
    <h1>Insert Footer Text Here</h1>
  </div>
</div> 

</body>

</html>
sudeep
  • 56
  • 3
  • This sounds like a duplicate of http://stackoverflow.com/questions/32385680/chrome-securityerror-loading-jquery-mobile-page-from-local-file-system?rq=1 ; did you look at something like the answers given here? – Foon Oct 07 '15 at 18:26
  • Yes i tried it but still no luck!! May i request you to please try running this code on your chrome locally. – sudeep Oct 08 '15 at 11:26
  • can you check in the developer tools of chrome if there are any errors from javascript? – Dilberted Oct 08 '15 at 11:28
  • Thank you dilberted for replying but even if I get it to work on my pc but this doesn't solve my problem, actually I need to use that jQuery file in my Android webview and I can't solve it unless it runs on chrome normally. You will face same issue if you try to run any jQuery file with chrome. Don't know what to do. :( – sudeep Oct 08 '15 at 11:35

1 Answers1

0

Install WampServer on your computer, copy the folder of your project in c:\wamp\www\, turn on the local server and run your jQuery Mobile page (localhost/folder of your project/jquery mobile page ).

You need a local server to run any jquery mobile page in Chrome.

Hawken MacKay Rives
  • 1,171
  • 1
  • 16
  • 26