jquery 모바일 multipage template을 사용하고 있고 프로그래밍 방식으로 두 번째 페이지를 열고 싶습니다.jQuery Mobile : changePage 메서드를 사용하는 중에 "유형 오류"가 발생합니다.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<meta charset="utf-8" />
</head>
<body>
<!--===========This is the first page==========-->
<div data-role="page" id="page1">
<div data-role="header" data-theme="e">
<h1>Dialog</h1>
</div>
<div data-role="content" data-theme="a">
<h1>This is page One</h1>
</div>
<div data-role="footer">
<h4>Page Footer</h4>
</div>
</div>
<!--========================================================-->
<!--===========This is the second page==========-->
<div data-role="page" id="page2">
<div data-role="header" data-theme="e">
<h1>Dialog</h1>
</div>
<div data-role="content" data-theme="a">
<h1>This is page Two</h1>
<
</div>
<div data-role="footer">
<h4>Page Footer</h4>
</div>
</div>
<script>
jQuery.mobile.changePage($("#page2"));
</script>
</body>
</html>
모든 것이 좋아 보인다하지만이 페이지를 열 때, 내가 불을 지르고에서 다음 오류 얻을 :
TypeError: u is undefined
내가
언제 열려고합니까? 이 답변 확인 http://stackoverflow.com/questions/16253300/removeclass-working-on-jsfiddle-but-not-in-the-browser/16253556#16253556 – Omar