user1379378
user1379378

Reputation: 59

fadein onload doesn't seem to be working

this is the code i'm working with, but it doesn't seem to be doing much, any ideas why?

  $(window).load(function(){
    $('#web01').fadeIn(1500);
    $('#web02').fadeIn(1500);

http://jsfiddle.net/BbKsq/11/ this is the code of the entire page, maybe there are some conflicts going on?

thanks

Upvotes: 0

Views: 33

Answers (2)

oooyaya
oooyaya

Reputation: 1803

Are you expecting that they will fade in from the start? if so, set them to 0 first. Right now you're fading from 100 to 100 over 1500ms, which is no net effect thus you see no change.

$("#web01,#web02").hide().fadeIn(1500);

Upvotes: 0

adeneo
adeneo

Reputation: 318342

You can't fadeIn something that is already visible. Set the elements to display none in CSS.

#web01 {
    width: 10px;
    height: 10px;
    z-index: 0;
    display:none;
}

FIDDLE

Upvotes: 2

Related Questions