我想在加载 jQuery mobile 之前通过 AJAX 动态加载页面内容,所以我正在尝试使用该mobileinit
事件。但它不起作用。这是我的代码请帮忙
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://jquerymobile.com/demos/1.3.0-beta.1/css/themes/default/jquery.mobile-1.3.0-beta.1.css" />
<script src="js/jquery-1.8.2.min.js"></script>
<script>
$(document).bind("mobileinit", function() {
$("#notification").text("Please enter your domain name.");
});
</script>
<script src="js/jquery.mobile-1.3.0.min.js"></script>
<title>Insert title here</title>
</head>
<body>
<h3 id="notification" style="font-family: fantasy; color: red; text-align: center;"></h3>
</body>
</html>