Difference between revisions of "Team:BostonU/HomeTwo"

Line 7: Line 7:
 
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
 
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
  
#forward, #reverse {
+
#one {
border-radius:50%;
+
position:absolute;
 +
left:10%;
 
}
 
}
  
.show {
+
#two {
transition:display, 2s;
+
position:absolute;
 +
left:-110%;
 +
}
 +
 
 +
#three {
 +
position:absolute;
 +
left:-110%;
 +
}
 +
 
 +
#four {
 +
position:absolute;
 +
left:-110%;
 
}
 
}
 
</style>
 
</style>
Line 31: Line 43:
 
   var n = 2;
 
   var n = 2;
 
   setInterval(function () {
 
   setInterval(function () {
       n = n+1;
+
       n = n+1;  
       if (n > 5) {
+
       if (n==2) {
       $("#one").css('display', 'block');
+
       $("#two").css('left', '110%')
       $("#two").css('display', 'none');
+
       $('#two').animate({'left':'10%'}, 500);
      $("#three").css('display', 'none');
+
       $("#one").animate({'left':'-110%'}, 500);}  
      $("#four").css('display', 'none');  
+
      n = 2;}     
+
      else if (n == 2) {
+
       $("#one").css('display', 'block');
+
      $("#two").css('display', 'none');
+
      $("#three").css('display', 'none');
+
      $("#four").css('display', 'none'); }
+
 
       else if (n==3) {
 
       else if (n==3) {
       $("#two").css('display', 'block');
+
       $("#two").css('left', '110%')
       $("#one").css('display', 'none');
+
       $('#two').animate({'left':'10%'}, 500);
       $("#three").css('display', 'none');
+
       $("#one").animate({'left':'-110%'}, 500);}
      $("#four").css('display', 'none');}
+
 
       else if (n==4) {
 
       else if (n==4) {
       $("#three").css('display', 'block');
+
       $("#three").css('left', '110%');
       $("#one").css('display', 'none');
+
       $('#three').animate({'left':'10%'}, 500);
       $("#two").css('display', 'none');
+
       $("#two").animate({'left':'-110%'}, 500);}
      $("#four").css('display', 'none');}
+
 
       else if (n==5) {
 
       else if (n==5) {
       $("#four").css('display', 'block');
+
       $("#four").css('left', '110%');
       $("#one").css('display', 'none');
+
      $('#four').animate({'left':'10%'}, 500);
       $("#two").css('display', 'none');
+
       $("#three").animate({'left':'-110%'}, 500);}
       $("#three").css('display', 'none');}
+
      else if (n == 6) {
 +
       $("#one").css('left', '110%');
 +
       $("#four").animate({'left':'-110%'}, 500);
 +
      $("#one").animate({'left':'10%'}, 500);
 +
      n = 2;}  
 
         }, 3000);
 
         }, 3000);
 
   });
 
   });

Revision as of 19:24, 15 August 2016