why the test message is displayed twice:
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> </head> <body> <script type="text/javascript"> alert("Test"); </script> </body> </html>
I copied the headers from http://jquerymobile.com/demos/1.2.0/docs/about/getting-started.html , and when I started to do some examples, I noticed that my javascript methods called twice.
Here is the code in JsFiddle:
http://jsfiddle.net/LsxBW/2/
source share