저는 JqueryMobile을 처음 사용합니다. 나는 버튼의 간단한 클릭 이벤트를 원했고,하지만jquerymobile 클릭 이벤트가 작동하지 않습니다.
html로는
<!DOCTYPE html>
<html dir='ltr'>
<head>
<title>Test Page</title>
<link rel="stylesheet" href="/css/style.css"/>
<script src='js/jquery.mobile.js'></script>
<script src='js/script.js'></script>
</head>
<body>
<div data-role="page" id='mypage'>
<button id='load_ajax'>Carica</button>
<br />
<div id='content'></div>
</div><!-- /content -->
</body>
</html>
하고 script.js에서 스크립트는
이다 (I 파이어 폭스에서 그것을 사용하고 있습니다) 작동하지 않습니다$('#mypage').delegate('#load_ajax','click',function (e) {
alert('test');
});
디버거를 사용하더라도 경고 팝업이 표시되지 않습니다.
내가 jQuery를-1.7.2 호출하기 때문에이 솔루션이 작동합니다 생각합니다. 해당 라이브러리를 제거하면 더 이상 작동하지 않습니다. 이것이 필요합니까? 나는 jquerymobile이 jquery를 필요로하지 않는다고 생각했다. – Grey
http://jquerymobile.com/demos/1.2.0/docs/about/getting-started.html을 읽고 http://jquerymobile.com/download/을 확인하십시오. jQuery를 제거하면 jQuery Mobile JS 파일에서 $ 기호를 확인할 수 없습니다. –