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 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    33
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Jquery News Scroller Issue

    Hi guys,

    I found a great jquery vertical news scroller from http://jdsharp.us/jQuery/plugins/jdNewsScroll/ which I customised for a website at http://www.bizmagic.com.au/preview/acceler8/ - (bottom right)

    There is some code in it that randomises when the scroller starts scrolling.

    Code:
    // Randomize when the scrolling will start, afterwards it will pause by delay
    this.$counter   = (Math.floor(Math.random() * 10) * 10);
    However I wish for it to begin scrolling at page load, it seems kinda silly for its start time to be totally random.

    The full JS is at http://www.bizmagic.com.au/preview/a...dNewsScroll.js

    I can edit JS but not write it from scratch, I was hoping someone would have any idea to make it start instantly instead of randomly. Much appreciated!

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Dunno. I'd set it to 0 and see what happens.

  • #3
    New Coder
    Join Date
    Feb 2007
    Posts
    33
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hehe thanks.

    I have mucked around with different values and removed lines of code alltogether, however most changes stop the scrolling effect completely.

    I guess there might need to be a little bit of rewriting rather than removing.

    Totally stumped

  • #4
    Regular Coder
    Join Date
    Feb 2009
    Location
    Wheeling, IL
    Posts
    358
    Thanks
    5
    Thanked 62 Times in 60 Posts
    What Spudhead suggested is the solution to your problem...

    Code:
    this.$counter   = 0;
    Starts scrolling immediately. What exactly are you stumped about?
    The way to success is to assume that there are no impossible things. After all, if you think something is impossible, you will not even try to do it.

    How to ask smart questions?

  • #5
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe you would like to try on this jquery news scroller

    http://www.yeesiang.com/jquery.autoScroller

  • #6
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outstanding

    This is EXACTLY what I've been looking for.. You guys rock!!! I need to incorporate into something I'm doing... This is GREAT!!

    Thank you!


  •  

    Posting Permissions

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