|
|
(293 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | {{BostonU_we_tryin}}
| |
− | <html>
| |
− | <style>
| |
| | | |
− | #sideMenu, #top_title {display:none;}
| |
− | body {background-color:white; }
| |
− | #content { padding:0px; width:100%; margin-top:-7px; margin-left:0px;}
| |
− | #bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
| |
− |
| |
− |
| |
− | #forward, #reverse {
| |
− | border-radius:50%;
| |
− | }
| |
− |
| |
− |
| |
− | #one {
| |
− | position:absolute;
| |
− | left:10%;
| |
− | }
| |
− |
| |
− | #two {
| |
− | position:absolute;
| |
− | left:-110%;
| |
− | }
| |
− |
| |
− | #three {
| |
− | position:absolute;
| |
− | left:-110%;
| |
− | }
| |
− |
| |
− | #four {
| |
− | position:absolute;
| |
− | left:-110%;
| |
− | }
| |
− |
| |
− | #container {
| |
− | width:100%;
| |
− | height:80vh;
| |
− | position:absolute;
| |
− | background-color:blue;
| |
− | overflow:hidden;
| |
− | }
| |
− |
| |
− | </style>
| |
− |
| |
− | <body>
| |
− | <div id = "container">
| |
− | <div style = "width:80%; height:80vh; background-color:green;" id = "one" class = "show"></div>
| |
− | <div style = "width:80%; height:80vh; background-color:purple;" id = "two" class = "show"></div>
| |
− | <div style = "width:80%; height:80vh; background-color:black;" id = "three" class = "show"></div>
| |
− | <div style = "width:80%; height:80vh; background-color:red;" id = "four" class = "show"></div>
| |
− | </div>
| |
− |
| |
− | <div style = "width:7vw; height:7vw; background-color:yellow; text-align:center; font-size:300%; position:absolute; z-index:100; left: 93%; top:50vh;" id = "forward"><div style = "height:3vw"></div>></div>
| |
− | <div style = "width:7vw; height:7vw; background-color:yellow; text-align:center; font-size:300%; position:absolute; top:50vh; z-index:100;" id = "reverse"><div style = "height:3vw"></div><</div>
| |
− |
| |
− | <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
| |
− | </body>
| |
− |
| |
− | <script type="text/javascript">
| |
− | $(document).ready(
| |
− | function(){
| |
− | var n = 2;
| |
− | $("#forward").click(function () {
| |
− | n = n+1;
| |
− | if (n==3) {
| |
− | $('#two').animate({'left':'10%'}, 500);
| |
− | $("#one").animate({'left':'110%'}, 500);
| |
− | $("#three").css('left', '-110%');}
| |
− | else if (n==4) {
| |
− | $('#three').animate({'left':'10%'}, 500);
| |
− | $("#two").animate({'left':'110%'}, 500);
| |
− | $("#four").css('left', '-110%');}
| |
− | else if (n==5) {
| |
− | $('#four').animate({'left':'10%'}, 500);
| |
− | $("#three").animate({'left':'110%'}, 500);
| |
− | $("#one").css('left', '-110%');}
| |
− | else if (n == 6) {
| |
− | $("#four").animate({'left':'110%'}, 500);
| |
− | $("#one").animate({'left':'10%'}, 500)
| |
− | $("#two").css('left', '-110%');
| |
− | n = 2;}
| |
− | });
| |
− |
| |
− | $("#reverse").click(function () {
| |
− | n = n-1;
| |
− | if (n == 1) {
| |
− | $("#four").animate({'left':'10%'}, 500);
| |
− | $("#one").animate({'left':'110%'}, 500);
| |
− | $("#three").css('left', '-110%');
| |
− | n = 5;}
| |
− | else if (n==2) {
| |
− | $('#one').animate({'left':'10%'}, 500);
| |
− | $("#two").animate({'left':'-110%'}, 500);}
| |
− | else if (n==3) {
| |
− | $('#two').animate({'left':'10%'}, 500);
| |
− | $("#three").animate({'left':'110%'}, 500);
| |
− | $("#four").css('left', '-110%');}
| |
− | else if (n==4) {
| |
− | $('#three').animate({'left':'10%'}, 500);
| |
− | $("#four").animate({'left':'110%'}, 500);
| |
− | $("#two").css('left', '-110%');
| |
− | $("#one").css('left', '-110%');}
| |
− | else if (n==5) {
| |
− | $('#four').animate({'left':'10%'}, 500);
| |
− | $("#three").animate({'left':'110%'}, 500);
| |
− | $("#one").css('left', '-110%');
| |
− | $("#two").css('left', '-110%');}
| |
− | });
| |
− |
| |
− | });
| |
− | </script>
| |
− |
| |
− | </html>
| |