Here's my jQuery to fade in the different content areas:
Code:
$(document).ready(function() {
$("#areatwo").hide();
$("#button2").click(function() {
$("#areaone").fadeOut(1500,function(){
$("#areatwo").fadeIn(1500);
});
});
$("#button1").click(function() {
$("#areatwo").fadeOut(1500,function(){
$("#areaone").fadeIn(1500);
});
});
});
This is my body content that is affected by the jQuery. Here's the two content areas that fade in when the appropriate buttons are pushed:
Code:
<div id="areaone">
<div id="slideshow" class="fadeincontent">
<div id="fadetest">
<a href="images/poster.gif" rel="shadowbox" title="How to Drive a Stickshift Instructional Poster"><img src="images/poster_thumb1b.gif" width="425" height="166" alt="How to Drive a Stickshift Instructional Poster"/></a>
<a href="images/poster.gif" rel="shadowbox" title="How to Drive a Stickshift Instructional Poster"><img src="images/poster_thumb2b.gif" width="425" height="166" alt="How to Drive a Stickshift Instructional Poster"/></a>
<a href="images/poster.gif" rel="shadowbox" title="How to Drive a Stickshift Instructional Poster"><img src="images/poster_thumb3b.gif" width="425" height="166" alt="How to Drive a Stickshift Instructional Poster"/></a>
<a href="images/poster.gif" rel="shadowbox" title="How to Drive a Stickshift Instructional Poster"><img src="images/poster_thumb4b.gif" width="425" height="166" alt="How to Drive a Stickshift Instructional Poster"/></a>
<a href="images/poster.gif" rel="shadowbox" title="How to Drive a Stickshift Instructional Poster"><img src="images/poster_thumb5b.gif" width="425" height="166" alt="How to Drive a Stickshift Instructional Poster"/></a>
</div>
<div id="slidenav" class="nav">
<a id="prev2" href="#"> <span>Back</span></a>
<a id="next2" href="#"> <span>Forward</span> </a>
<span style="position:relative; left: 90px; top:7px; font-weight:500; font-size:11px;">
Click on Slideshow to Launch
</span>
</div>
</div>
</div>
<div id="areatwo" class="fadeincontent">
<img src="images/poster_thumb3b.gif" />
</div>
Here are the buttons that make the fading happen when clicked on:
Code:
<div id="buttonstofade">
<center><span class="fadebutton"><a id="button1" href="#">First
Content Area</a></span></center>
<center><span class="fadebutton"><a id="button2" href="#">Second
Content Area</a></span></center>
</div>