JQuery Mobile Transition Effect

Source: Internet
Author: User

JQuery Mobile has a series of effects on how to transition from one page to the next page. The premise is that the browser must support CSS3 3D conversions:

Browser support
    • Internet Explorer 10 supports 3D conversions (earlier versions are not supported)
    • Opera still does not support 3D conversion

Transition effects can be applied to any link or form submission by using the Data-transition property:

The following table shows the available transitions that can be used with the Data-transition property:

All of the above effects support reverse motion at the same time, for example, if you want the page to swipe from left to right, rather than to the left, use the Data-direction property with the value "reverse". On the Back button is the default.

<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title></title></Head><Linkrel= "stylesheet"href= "Http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"><Scriptsrc= "Http://code.jquery.com/jquery-1.8.3.min.js"></Script><Scriptsrc= "Http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></Script></Head><Body>    <DivData-role= "page"ID= "Pageone">        <DivData-role= "header">            <H1>HEADER</H1>        </Div>                <DivData-role= "Content">            <P>Click the link to see the slide effect</P>            <ahref= "#pagetwo"data-transition= "Slide">Swipe to page two</a>        </Div>                <DivData-role= "Footer">            <H1>FOOTER</H1>        </Div>    </Div>            <DivData-role= "page"ID= "Pagetwo">          <DivData-role= "header">            <H1>I am a dialog box!</H1>          </Div>      <DivData-role= "Content">        <P>Click the link to see the slide effect</P>        <ahref= "#pageone"data-transition= "Slide">Swipe to page One</a><!--Add this property data-direction= "reverse" to enable reverse sliding -      </Div>      <DivData-role= "Footer">          <H1>Footer text</H1>      </Div></Div> </Body></HTML>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.