2014-09-09 2 views
-1

탭 이벤트에서 웹 사이트의 페이지로 이동하고 싶습니다. 그러나 함수에서 링크를 전달하는 방법을 모르겠습니다.함수에 URL 전달하기

주세요.

<div data-role="page"> 
<div data-role="header"> 
    <h1>My Header</h1> 
</div> 
<div data-role="content"> 
<ul data-role="listview" id="first"> 
    <li>Go Beyond 140 Characters</li> 
</ul> 
</div> 
</div> 

<script> 
    $("#first").bind("tap", function(e) { 
     <a href ="http://www.tricksfind.in/2014/09/twitlonger-go-beyond-140-characters-in.html"></a> 
}); 
</script> 

답변

0

아마 같은 :

$("#first").bind("tap", function(e) { 
    window.location.href = "http://www.tricksfind.in/2014/09/twitlonger-go-beyond-140-characters-in.html"; 
}); 

는 희망이 도움이!