1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.
  2. Better Analytics for WordPress Get It Free

Random image slider

Discussion in 'JavaScript' started by WebKing, Nov 15, 2007.

  1. #1
    is it possible by js?
     
    WebKing, Nov 15, 2007 IP
  2. cjburkha

    cjburkha Peon

    Messages:
    71
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes?

    Yes.
     
    cjburkha, Nov 15, 2007 IP
  3. cjburkha

    cjburkha Peon

    Messages:
    71
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    OK

    function randomImageSlider() {
    var imgObj = document.getElementById('imageID');
    imgObj.src = getRand() + '.jpg';
    }

    function getRand() {
    var ran_number=Math.floor(Math.random()*5);
    }

    function loaded() {
    window.setTimeout('randomImageSlider', 5000);
    }

    <body onload="loaded();">
    </body>
     
    cjburkha, Nov 15, 2007 IP
    WebKing likes this.