Change page transition to none

Description

The following code shows how to change page transition to none.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css">
<script type='text/javascript'
  src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head><!--from   ww  w. jav  a 2  s .co  m-->
<body>
<script>
function changetoPage2(){
   $.mobile.changePage($("#page2"), {transition : "none"});
}
</script>
  <div data-role="page" id="page1">
    <div data-role="header">
      <h3>Page1</h3>
    </div>
    <div data-role="content">
      <a href="#" onclick="changetoPage2()" data-role="button">Button1</a>
    </div>
  </div>
  <div data-role="page" id="page2">
    <div data-role="header">
      <h3>Page2</h3>
    </div>
    <div data-role="content">
      <a href="#page1" data-role="button">Button2</a>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme