Results 1 to 4 of 4

Thread: Ajaxticker rotation timeout

  1. #1
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Ajaxticker rotation timeout

    I'm new to the JavaScript language. My company is running the Ajax ticker on there website which rotates a short series of pictures. I would like to have the ticker rotate through the pictures once, then stop on the last picture. I haven't a clue on how to make this happen. If I'm understanding the script right, there is a timeout delay function in the script.

    Can anyone help me with the proper code to make this happen? Any suggestions would be helpful. I included the script as an attachment for reference.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    ajax_ticker.prototype.rotatemsg=function(){
    var instanceOfTicker=this
    if (this.mouseoverBol==1) //if mouse is currently over ticker, do nothing (pause it)
    setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
    else{ //else, construct item, show and rotate it!
    this.fadetransition("reset") //FADE EFFECT- RESET OPACITY
    this.contentdiv.innerHTML=this.messages[this.pointer]
    this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) //FADE EFFECT- PLAY IT
    this.pointer+=1;
    if (this.pointer<this.messages.length) setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) //update container periodically
    }
    }

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    MobileMe (07-13-2009)

  4. #3
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much.

  5. #4
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there a way to make each message individualy selectable ie 1 2 3 4, ive seen scripts that do this but theyre not ajax based.

Bookmarks

Posting Permissions

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