0

I'm trying to use the jQuery Mobile swipe feature but I'm experiencing a little problem when I include this:

http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js

and this: http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js

The issue is a "Loading" text in the bottom of the page that is shown when i load the Mobile library. Who knows why is it shown? I have the problem with both Chrome/Chromium and Firefox browsers. You can take a look to my code here: http://jsfiddle.net/rfringuello89/yLGKT/

as you can see I used 3 not draggable but swipeable <div></div>

Thanks guys

user1638466
  • 300
  • 1
  • 5
  • 18

1 Answers1

1

You need to include the appropriate css for jQuery Mobile too, that should do the trick.


Edit: check this fiddle, I included the css and it works fine.

This is the right way to include the libraries:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>

according to the docs.


Edit2: according to this answer by eivers88 you can use the following code to stop jQuery Mobile from initialising the page on DOM-Ready (without the need to include the css dependency):

<script type="text/javascript">$(document).bind("mobileinit", function(){$.extend(  $.mobile , {autoInitializePage: false})});</script>
Community
  • 1
  • 1
Marco Kerwitz
  • 5,294
  • 2
  • 18
  • 17