English 中文(简体)
在安伯瑟与JQuery Mobile公司一起添加点击事件手的问题
原标题:Problem adding click event handler with JQuery Mobile in Android Browser

我与roid子管有奇怪的问题。 我希望,这是我根本错做的事情,而不是“JQuery bug”。 我在Embeth和Kyre曾尝试过以下法典。 然而,当我尝试安乐施会时,点击“Get Tweets”纽托邦并不奏效。 这似乎是一个与JQuery Mobile有关的问题,因为当我把这一活动添加到普通的非JQuery 移动物体之后,它就正确地约束了它和独角兽。 木工火灾。 我曾尝试过甲型和乙型双甲型双甲型和乙型.式的移动式,无uck。

<!DOCTYPE html> 
<html>
    <head>
        <style type="text/css" rel="stylesheet" >
            .chkTag { color: black; }
            /*.chkFeed { color: black; }*/
        </style>
        <link rel="stylesheet" href="twitter/style/jquery.mobile-1.0a4.1.min.css"     />        
        <script type="text/javascript" src="twitter/js/jquery-1.6.1.min.js"></script>
        <script type="text/javascript" src="twitter/js/jquery.mobile-1.0a4.1.js">       
</script>
    <script type="text/javascript">
    $(document).ready(function() {            
        $(".tweetjack").click(function() {
            console.log( test );
        });
        console.log( page loaded );
    });
    </script>
    <style type="text/css">
        .profile img { width: 48px; height: 48px; display: inline; float: left; padding-right: 10px; }
        /*.ui-collapsible-contain { max-height: 950px; min-height: 950px; }*/
    </style>
</head>
<body>
    <div id="page" data-role="page" data-theme="d">
        <div id="header" data-role="header">
            <h1>Twitter App</h1>
        </div>
        <div data-role="content">
            <div id="1" class="tweetjack" data-role="collapsible" data-collapsed="true"><h3>Get Tweets</h3><p id="text1"></p><div data-role="collapsible" data-collapsed="true"><h3 date-theme="a">Filter</h3></div></div>
        </div>
        <div id="footer" data-role="footer">
            <a class="tweetjack"><h2>BT</h2></a>
        </div>
    </div>
</body>
</html>

这本书也只在海底浏览器中失效。

$( #page ).live( pagecreate ,function(event){
      console.log( page loaded );
      $(".tweetjack").click(function() {
            console.log( test );
        });
    });
最佳回答

因此,在目前确实有吉大斯流动方式做这些事情的时候,似乎我只是这样做了。 这里是正确的法典。

$( #page ).live( pagecreate ,function(event){
  console.log( page loaded );
  $(".tweetjack").live( tap ,function(event) {
      console.log( test );
  });
});
问题回答

JQM似乎拦截了点击,将耳光打到点号,如果你再次试图拦截,就会造成一些混乱。 这为我工作,是为了在联合后勤部接手之前处理这一联系:

$(document).bind("pageinit", function() {
   $("a").bind("click", function(e){  fix_mobile_links(this, e)  });
}




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签