Jump to content
xisto Community
BooZker

Jquery Fadein Help How do I make it do this?

Recommended Posts

Problem fixed! SORRY. You can delete this topic or keep it up for people later on. I fixed the code so it will fade a div on page load. So if anyone wants to use it!

 

 

jQuery makes it super easy to make things fade in and out, but I don't know how to do this and there site isn't responding fast enough. I have waited 30 mins! :P Anyways all I want is something super simple with jQuery

 

I have a logo as a background image in my CSS in a div with a class of .logo. I want that to load slowly when the page loads. So you would go to my site and you wouldnt see anything for just a second then the logo fades in. I could use flash, yes, but that's icky and bloated for something so simple that I know I can do with jQuery. Here is the code that I was editing to try to get it to work. How and what do i do?

 

<script type="text/javascript">	$(document).ready(function(){	$('div.logo').fadeIn('slow');	});	</script>

This is what the HTML looks like that I want to have fade in

 

<div class="logo"></div>

and the CSS

 

.logo {		margin:126px auto;	background:url(../images/styles/logo.jpg);	border:none;	color:#ffffff;	width:536px;	height:171px;	   display:hidden;	}

right now i have it working... but not the way i want. Right now it fades in like the text on http://15daysofjquery.com/
Edited by BooZker (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.