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; } | ||
− | # | + | #one { |
− | + | position:absolute; | |
+ | left:10%; | ||
} | } | ||
− | + | #two { | |
− | + | 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 | + | if (n==2) { |
− | $("# | + | $("#two").css('left', '110%') |
− | $( | + | $('#two').animate({'left':'10%'}, 500); |
− | + | $("#one").animate({'left':'-110%'}, 500);} | |
− | + | ||
− | + | ||
− | + | ||
− | $("#one"). | + | |
− | + | ||
− | + | ||
− | + | ||
else if (n==3) { | else if (n==3) { | ||
− | $("#two").css(' | + | $("#two").css('left', '110%') |
− | $( | + | $('#two').animate({'left':'10%'}, 500); |
− | $("# | + | $("#one").animate({'left':'-110%'}, 500);} |
− | + | ||
else if (n==4) { | else if (n==4) { | ||
− | $("#three").css(' | + | $("#three").css('left', '110%'); |
− | $( | + | $('#three').animate({'left':'10%'}, 500); |
− | $("#two"). | + | $("#two").animate({'left':'-110%'}, 500);} |
− | + | ||
else if (n==5) { | else if (n==5) { | ||
− | $("#four").css(' | + | $("#four").css('left', '110%'); |
− | $("# | + | $('#four').animate({'left':'10%'}, 500); |
− | $("# | + | $("#three").animate({'left':'-110%'}, 500);} |
− | $("# | + | 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