Don't talk nonsense, very simple, directly on the code.
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Untitled Document </title>
<script type= "Text/javascript" src= "Jquery-1.11.2.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#btn"). Unbind (). Click (function () {
$ ("#first"). Hide ();
$ ("#sec"). CSS ("left", " -200px"). Animate ({"Left": "0px"},500). Show ();
});
$ ("#btn2"). Unbind (). Click (function () {
$ ("#sec"). Hide ();
$ ("#first"). CSS ("left", "200px"). Animate ({"Left": "0px"},500). Show ();
});
$ ("#btn3"). Unbind (). Click (function () {
$ ("#first"). Hide ();
$ ("#sec"). CSS ("Top", "200px"). Animate ({"Top": "0px"},500). Show ();
});
$ ("#btn4"). Unbind (). Click (function () {
$ ("#sec"). Hide ();
$ ("#first"). CSS ("Top", " -200px"). Animate ({"Top": "0px"},500). Show ();
});
});
</script>
<body>
<div style= "width:200px; height:200px; " >
<div id= "First" style= "Text-align:center; width:200px; height:200px;Position:absolute;">
<p> first Page </p>
<p> first Page </p>
<p> first Page </p>
<p> first Page </p>
<p> first Page </p>
</div>
<div id= "SEC" style= "text-align:center; width:200px; height:200px; Display:none;Position:absolute;">
<p> second page </p>
<p> second page </p>
<p> second page </p>
<p> second page </p>
<p> second page </p>
</div>
</div>
<div style= "width:200px; height:50px; " >
<input type= "button" value= "scroll Right" id= "btn"/>
<input type= "button" value= "scroll Left" id= "btn2"/>
<input type= "button" value= "scroll Up" id= "Btn3"/>
<input type= "button" value= "Scroll Down" id= "Btn4"/>
</div>
</body>
Special note: The Red place must be added, otherwise there will be no effect.
jquery swipe up or down