简体   繁体   English

iphone上的jQTouch-在onclick和javascript函数后跳转到特定的DIV

[英]jQTouch on Iphone - jumping to specific DIV after onclick and javascript function

I am just starting to use jQTouch. 我刚刚开始使用jQTouch。 In #contact I have a button that calls javascript function sendEmail() #contact我有一个调用javascript函数sendEmail()的按钮

How can I jump to/show the div #statusDiv in the javascript function after sending the email? 发送电子邮件后, #statusDiv在javascript函数中跳转/显示div #statusDiv

    function sendEmail() {
        // sending email

        // --> how to jump to DIV called statusDiv
    }

<div id="home" class="current">    
</div>

<div id="contact"  >
    <ul class="rounded">
      <li ><a id="emailButton" onclick="sendEmail()">Stuur email</a></li>
    </ul>
</div>

<div id="statusDiv">
</div>

Use the goTo function from the jQtouch object. 使用jQtouch对象中的goTo函数。 Something like: 就像是:

jQT.goTo('#statusDiv')

In latest version you can use 在最新版本中,您可以使用

jQT.goTo('#statusDiv',"slideleft");

first argument is division name and second one is animation. 第一个参数是部门名称,第二个参数是动画。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM