Results 1 to 3 of 3

Thread: Pausing up-down Scroller

  1. #1
    Join Date
    Mar 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pausing up-down Scroller

    I have what should hopefully be a relatively simple question about this script.
    (relatively simple - however I have no idea how to accomplish it )

    What I am trying to accomplish is while an item is scrolling I would like it to pause if I then move my mouse over it (while scrolling)... I know mousing over when paused in position will stop it from going on to the next item, however, if I have a relatively long item that is scrolling by - I'd like to mouseover and pause where it is.

    How can this be accomplished?

    Thanks,
    Rich S Wyatt

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Warning: Please include a link to the DD script in question in your post, in this case: http://www.dynamicdrive.com/dynamicindex2/crosstick.htm. See this thread for the proper posting format when asking a question.


    Sure, simply replace the original animateup() function with the below version instead:

    Code:
    // -------------------------------------------------------------------
    // animateup()- Move the two inner divs of the scroller up and in sync
    // -------------------------------------------------------------------
    
    pausescroller.prototype.animateup=function(){
    var scrollerinstance=this
    if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
    setTimeout(function(){scrollerinstance.animateup()}, 100)
    else{
    if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
    this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
    this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
    setTimeout(function(){scrollerinstance.animateup()}, 50)
    }
    else{
    this.getinline(this.hiddendiv, this.visiblediv)
    this.swapdivs()
    setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
    }
    }
    }

  3. #3
    Join Date
    Mar 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Fantastic! Thanks! Sorry for not including the link. That'll teach me!

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
  •