Jquery mobile, document ready not working with link tag
Jquery mobile, document ready not working with link tag
Hi All,
I have a problem.
I have 2 pages
Page1
:
<!DOCTYPE html>
<html>
<head>
<title>Page 1</title>
<link rel="stylesheet" href="
http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css"
/>
<script src="
http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="
http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
</head>
<body>
<h1><a href='page2.jsp'>Link to page 2</a></h1>
</body>
</html>
Page 2:
<!DOCTYPE html>
<html>
<head>
<title>pages 2</title>
<link rel="stylesheet" href="
http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css"
/>
<script src="
http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="
http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
<script>
$(document).ready(function(){
alert("I am a Page 2");
});
</script>
</head>
<body>
<h1>This is page 2</h1>
</body>
</html>
When I run page1.jsp, i click "link to page2" function $(document).ready of page2.jsp not working
I don't know what happend???
Topic Participants
cuongdv2301
jakecigar
fornanopods
jtara-jquery