Difference between revisions of "Team:BostonU/HomeOne"

Line 39: Line 39:
 
position:absolute;
 
position:absolute;
 
background-color:blue;
 
background-color:blue;
overflow:hidden;
 
 
}
 
}
  
Line 46: Line 45:
 
<body>
 
<body>
 
<div id = "container">
 
<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:green;; z-index:10;" 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: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:black;" id = "three" class = "show"></div>
Line 64: Line 63:
 
   $("#forward").click(function () {
 
   $("#forward").click(function () {
 
       n = n+1;
 
       n = n+1;
       if (n > 5) {
+
       if (n == 6) {
       $("#one").css('display', 'block');
+
       $("#four").animate({'left':'110%'}, 500);
      $("#two").css('display', 'none');
+
       $("#one").animate({'left':'10%'}, 500);
       $("#three").css('display', 'none');
+
      $("#four").css('display', 'none');  
+
 
       n = 2;}       
 
       n = 2;}       
 
       else if (n==3) {
 
       else if (n==3) {
Line 78: Line 75:
 
       else if (n==5) {
 
       else if (n==5) {
 
       $('#four').animate({'right':'10%'}, 500);
 
       $('#four').animate({'right':'10%'}, 500);
       $("#three").animate({'left':'110%'}, 500);}
+
       $("#three").animate({'left':'110%'}, 500);
 +
      $("#one").css('left', '-110%');}
 
         });
 
         });
 
  $("#reverse").click(function () {
 
      n = n-1;
 
      if (n < 2) {
 
      $("#one").css('display', 'none');
 
      $("#two").css('display', 'none');
 
      $("#three").css('display', 'none');
 
      $("#four").css('display', 'block');
 
      n = 5;}
 
      if (n == 2) {
 
      $("#one").css('display', 'block');
 
      $("#two").css('display', 'none');
 
      $("#three").css('display', 'none');
 
      $("#four").css('display', 'none'); }
 
      else if (n==3) {
 
      $("#two").css('display', 'block');
 
      $("#one").css('display', 'none');
 
      $("#three").css('display', 'none');
 
      $("#four").css('display', 'none');}
 
      else if (n==4) {
 
      $("#three").css('display', 'block');
 
      $("#one").css('display', 'none');
 
      $("#two").css('display', 'none');
 
      $("#four").css('display', 'none');}
 
      else {
 
      $("#four").css('display', 'block');
 
      $("#one").css('display', 'none');
 
      $("#two").css('display', 'none');
 
      $("#three").css('display', 'none');}
 
        });
 
 
 
   });
 
   });
 
</script>
 
</script>
  
 
</html>
 
</html>

Revision as of 18:18, 15 August 2016

>
<