Archive

Archive for the ‘jQueryMobile’ Category

jQueryMobile excute javascript code twice

October 16, 2012 Leave a comment

I have came across a problem while I putting some JavaScript code inside the HTML body it was excuted twice .


<body>
 <script language="javascript">
 $(document).ready(function() {
 alert("1");
 });
 </script>
 </body>
 

And if I move the JavaScript code within <head> section, it will solve the issue.

Advertisements
Categories: JavaScript, jQueryMobile