jQuery $.mobile library is undefined

Tags: , , ,

I have linked jQuery and jQuery mobile to my code. I got this error in the console:

TypeError: $.mobile is undefined

I have rechecked the URL and all are correct, I have update the files(jQuery, jQuery mobile) and the issue is still exists. I have place the jquery.js before jquery.mobile.js

This is my code:

    <script src="JS/jquery.js" type="text/javascript"></script>
    <script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>
    <script src="JS/bootstrap.min.js" type="text/javascript"></script>
    <script src="JS/code.js" type="text/javascript"></script>   

and it’s on the end of the file. the content of code.js: http://pastebin.com/3LTcxs9S


<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"> 
<script type="text/javascript" src="http://code.jquery.com/mobile/1.3.1/jquery.mobile- 

try this by replacing your code

NOTE* put jquery mobile script at last after putting all jquery library scripts, im sure it will work

Source: stackoverflow