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
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow please help me with simple js snippet

    hey guys .. I currently have this code. which basically changes the background of my site with those images.

    live demo here

    I want to add a fading effect (transition) when the images change.
    can you help me out.

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
     
    <script type="text/javascript"> 
     
    //$(document).ready(function(){
     
    function load_dede() {
    setTimeout("$('body').css('background','url(http://imgur.com/FetJJ.jpg)')", 0);
    setTimeout("$('body').css('background','url(http://imgur.com/8l0jw.jpg)')", 20000);
    setTimeout("$('body').css('background','url(http://imgur.com/Iinh6.jpg)')", 40000);
    setTimeout("$('body').css('background','url(http://imgur.com/vcvIf.jpg)')", 60000);
    setTimeout("$('body').css('background','url(http://imgur.com/bJJzp.jpg)')", 80000);
    setTimeout("$('body').css('background','url(http://imgur.com/pkmtH.jpg)')", 100000);
    setTimeout("$('body').css('background','url(http://imgur.com/zk22X.jpg)')", 120000);
    setTimeout("$('body').css('background','url(http://imgur.com/DcccT.jpg)')", 140000);
    setTimeout("$('body').css('background','url(http://imgur.com/TWPNK.jpg)')", 160000);
    setTimeout("load_dede()", 180000);
    }
    //});
     
    window.onload =  load_dede();
     
     
    </script>
    it would be great if some one can help me out.

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    You'll probably want to take a look at the Supersized Full Screen Background/Slideshow jQuery Plugin

  • #3
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thanks ..that really helps


  •  

    Tags for this Thread

    Posting Permissions

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