开发者

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

开发者 https://www.devze.com 2023-01-02 05:55 出处:网络
I am just starting to use jQTouch. In #contact I have a button that calls javascript function sendEmail()

I am just starting to use jQTouch. In #contact I have a button that calls javascript function sendEmail()

How can I jump to/show the div #statusDiv in the javascript function after sending the email?

    function sendEmail() {
        // sending email

开发者_Python百科        // --> 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. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消