Difference between revisions of "Team:BostonU/HomeOne"

Line 16: Line 16:
 
#one {
 
#one {
 
position:absolute;
 
position:absolute;
right:10%;
+
left:10%;
 
}
 
}
  
 
#two {
 
#two {
 
position:absolute;
 
position:absolute;
right:110%;
+
left:-110%;
 
}
 
}
  
 
#three {
 
#three {
 
position:absolute;
 
position:absolute;
right:110%;
+
left:-110%;
 
}
 
}
  
 
#four {
 
#four {
 
position:absolute;
 
position:absolute;
right:110%;
+
left:-110%;
 
}
 
}
  
Line 63: Line 63:
 
  var n = 2;
 
  var n = 2;
 
   $("#forward").click(function () {
 
   $("#forward").click(function () {
       n = n+1;
+
       n = n+1;    
       if (n == 6) {
+
       if (n==3) {
      $("#four").animate({'left':'110%'}, 500);
+
      $("#one").animate({'left':'10%'}, 500);
+
      $("#three").css('left', '-110%');
+
      n = 2;}     
+
      else if (n==3) {
+
 
       $('#two').animate({'left':'10%'}, 500);
 
       $('#two').animate({'left':'10%'}, 500);
 
       $("#one").animate({'left':'110%'}, 500);
 
       $("#one").animate({'left':'110%'}, 500);
       $("#four").css('left', '-110%');}
+
       $("#three").css('left', '-110%');}
 
       else if (n==4) {
 
       else if (n==4) {
 
       $('#three').animate({'left':'10%'}, 500);
 
       $('#three').animate({'left':'10%'}, 500);
       $("#two").animate({'left':'110%'}, 500);}
+
       $("#two").animate({'left':'110%'}, 500);
 +
      $("#four").css('left', '-110%');}
 
       else if (n==5) {
 
       else if (n==5) {
 
       $('#four').animate({'left':'10%'}, 500);
 
       $('#four').animate({'left':'10%'}, 500);
 
       $("#three").animate({'left':'110%'}, 500);
 
       $("#three").animate({'left':'110%'}, 500);
       $("#one").css('left', '-110%');
+
       $("#one").css('left', '-110%');}
       $("#two").css('left', '-110%');}
+
      else if (n == 6) {
 +
      $("#four").animate({'left':'110%'}, 500);
 +
      $("#one").animate({'left':'10%'}, 500)
 +
       $("#two").css('left', '-110%');
 +
      n = 2;}  
 
     });
 
     });
  

Revision as of 18:51, 15 August 2016

>
<