Fade demo
by rafacharkman
HTML
<input type="submit" name="BL" id="L" value="<" />
<input type="submit" name="BR" id="R" value=">" />
<div class="VitrineFont01">
<div id="Vitrine1">
<div class="VitrineBox">
<div class="VitrineBName">Example 1</div>
<div class="VitrineBImageA"></div><!--Largura==VitrineBox-->
<div class="VitrineBStatus">
<div class="VitrineBStatusA"><img src="" width="37" height="37" /></div>
</div>
<div class="VitrineBImage">
<img src="" width="75" height="100" />
</div><!--VitrineBImage-->
<div class="VitrineBPrice">
<table width="140" border="0">
<tr>
<td width="17" height="auto" align="center" valign="middle"><img src="" width="17" height="17" /></td>
<td width="81" align="left" valign="middle">
product price </td>
</tr>
</table>
</div><!--VitrineBPrice-->
<div class="VitrineBBotton">
<img src="" width="57" height="24" />
</div><!--VitrineBBotton-->
</div><!--VitrineBox-->
</div><!--Vitrine1-->
<div id="Vitrine2">
<div class="VitrineBox">
<div class="VitrineBName">Example 2</div>
<div class="VitrineBImageA"></div><!--Largura==VitrineBox-->
<div class="VitrineBStatus">
<div class="VitrineBStatusA"><img src="" width="37" height="37" /></div>
</div>
<div class="VitrineBImage">
<img src="" width="75" height="100" />
</div><!--VitrineBImage-->
<div class="VitrineBPrice">
<table width="140" border="0">
<tr>
<td width="17" height="auto" align="center" valign="middle"><img src=""...
CSS
<style type="text/css">
.SimpleTextFont02 {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333;
line-height: normal;
display: inherit;
}
.VitrineFont01 {
height: 100%;
width: 100%;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333;
line-height: normal;
display: inherit;
}
.HotPromoText {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #F00;
text-decoration: line-through;
}
.MIDConteudoRVitrine {
height: 200px;
width: 680px;
margin-right: auto;
margin-left: auto;
}
.VitrineBox {
height: 100%;
width: 25%;
float: left;
}
.VitrineBName {
height: auto;
text-align: center;
margin-bottom: 3px;
}
.VitrineBImage {
height: 100px;
width: 75px;
margin-right: auto;
margin-left: auto;
padding-top: 3px;
}
.VitrineBImageA {
height: 106px;
width: 170px;
background-image: url(images/imgBorda.png);
background-repeat: no-repeat;
background-position: center;
position: absolute;
}
.VitrineBPrice {
height: 30px;
width: 140px;
margin-top: 15px;
margin-right: auto;
margin-left: auto;
}
.VitrineBBotton {
height: 24px;
width: 57px;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
}
.VitrineBStatus {
height: auto;
width: auto;
position: absolute;
}
.VitrineBStatusA {
height: 37px;
width: 37px;
margin-left: 107px;
margin-top: 77px;
}
.VitrineBottons {
position: absolute;
height: 200px;
width: 680px;
z-index: 1;
}
.VitrineBotL {
float: left;
height: 29px;
width: 19px;
margin-top: 56px;
margin-left: 22px;
}
.VitrineBotR {
float: right;
height: 29px;
width: 19px;
margin-top: 56px;
margin-right: 20px;
}
</style>
JavaScript
$(document).ready(function(){
$("#Vitrine2").hide()
cont=1
$("#L").click(function(){
if(cont==1){}else{
$("#Vitrine2").fadeOut("500")
setTimeout(function() { $("#Vitrine1").fadeIn("500") },500)
cont=cont-1
}
})
$("#R").click(function(){
if(cont==2){}else{
$("#Vitrine1").fadeOut("500")
setTimeout(function() { $("#Vitrine2").fadeIn("500") },500)
cont=cont+1
}
})
})