Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    824
    Thanks
    93
    Thanked 18 Times in 18 Posts

    Fade in elements with the same class one by one

    If i have these elements

    Code:
    <span class="fadeMe" style="display:none;">One</span> | 
    <span class="fadeMe" style="display:none;">Two</span> | 
    <span class="fadeMe" style="display:none;">Three</span>
    Is there anyway i can use jQuery to fade them in one after another

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,785
    Thanks
    8
    Thanked 131 Times in 129 Posts
    set for a 1 second delay:

    Code:
    $(document).ready(function(){
    	var time = 0;
    	$('.fadeMe').each(function() {
    	    $(this).delay(time).fadeIn(1000);
    	    time += 1000;
    	});
    });
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #3
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    824
    Thanks
    93
    Thanked 18 Times in 18 Posts
    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •