2012-03-06 3 views
-1

전화 갭에 jquery가있을 수 있습니다. 즉, 아무 탭이나 누를 수 있습니다. & 요소에서 이벤트를 대기 중입니다. 나는 폰갭 문서로 검토 한하지만 jQuery를 모바일 그것을 가지고 있지만 나는이 순간에 포함하지 않고, 나는이PhoneGap Android 탭 앤 홀드 이벤트

또 다른 라이브러리를 추가 할 필요가 없습니다 않았다 기대했다 볼 아무것도에게

을 찾을 수 없습니다 고마워요

답변

-1

여기 당신은 동일하게 할 수 있습니다. 나는 내 프로젝트

<!DOCTYPE html> 
<html> 
<head> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> 
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
<script> 
$(document).on("pagecreate","#pageone",function(){ 
    $("p").on("taphold",function(){ 
    $(this).hide(); 
    });      
}); 
</script> 
</head> 
<body> 

<div data-role="page" id="pageone"> 
    <div data-role="header"> 
    <h1>The taphold Event</h1> 
    </div> 

    <div data-role="main" class="ui-content"> 
    <p>If you tap and hold me for one second, I will disappear.</p> 
    <p>Tap and hold me!</p> 
    <p>Tap and hold me too!</p> 
    </div> 

    <div data-role="footer"> 
    <h1>Footer Text</h1> 
    </div> 
</div> 

</body> 
</html> 

http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_event_taphold

+2

코드 블록 혼자 좋은 답변을 제공하지 않습니다에 노력했다. 설명을 추가하십시오. (왜 문제가 해결되었는지, 실수가 어디서 있었는지 ...) –

+0

"여기 당신은 똑같이 할 수 있습니다."라는 뜻을 얻으려고합니다. 이 코드 블록을 통해 여러분이 제안한 것을 설명하십시오. – Alfabravo

관련 문제