Adding Fade in using jquery?

I just want to simply fade in my content when I go to each section on the page using jquery.
For example when I go to my site and click the about button the about contents fade in and when I hit the contact button the contact contents fade in and so on. I have included my files below.

Thanks,
Tony
index.html
main.css
main.js
LVL 8
askurat1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gurvinder Pal SinghCommented:
$(document.body).click(function () {
      $("div:hidden:first").fadeIn("slow");
    });


check this link
http://docs.jquery.com/Effects/fadeIn

You can also check these links
http://www.geeksucks.com/toolbox/23-jquery-fade-in-fade-out-effect.htm
http://www.visual-blast.com/javascript/fade-inout-with-jquery/
0
askurat1Author Commented:
Well I have found all of these through google but none seem to help. I want something a little more specific to my needs. Just something to get me started.
0
darianbrCommented:
Try this, it is untested but the theory should work.
<a href='/aboutus.php' id='loadpage'>About us</a>
<a href='/contactus.php' id='loadpage'>Contact us</a>

<div id='pageContent'>Page will load in here</div>

<script type='text/javascript'>

$('#loadpage').click(function() {

     $('#pageContent').hide.load(this.href, 0, function() { $('#pageContent').fadeIn(1000); });

});

Open in new window

0
darianbrCommented:
Please post your solution here so other people are able to benefit.
0
askurat1Author Commented:
Solution:

$("#mainNav li a").click( function(){
        $(this).siblings().removeClass("active");  //  Unset all other buttons
        $(this).addClass("active");
		$(".section").fadeOut('fast');   
		
		// Now figure out what the 'href' attribute value is and find the element with that id.  	
		// Then show it.   
		var content_show = $(this).attr("href");   
		$(content_show).fadeIn(500);
		
		// do not perform default action. i.e. do not append #content_id to URL
		return false;         
    });

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.