Results 1 to 5 of 5

Thread: Looking for scroller with 100% width

  1. #1
    Join Date
    Sep 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking for scroller with 100% width

    Hello!

    I have an elastic design and can't find in www any marquee crossbrowser script with width not in pixels But may be anybody have that i need? I need script for sliding text news from right to left, tag <a> must be supported, on hover scrollable text must be frozen on unhover must scroll again. That's all P.S. This script must work with resizeble browser windows. Thank you

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Change the "fixed" width (px) in cross browser marquee script. It will suit your needs.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Sep 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sure, that's most interesting script, but if i use percent in with field

    //Specify the marquee's width (in pixels)
    var marqueewidth="100%"

    script does not work.. I don't know JavaScript and can't made calculation size of window on-the-fly for upgrading script.. Please, if you can, help
    Last edited by anycall; 09-07-2008 at 08:51 AM.

  4. #4
    Join Date
    Sep 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I was made simple changes to "Cross browser Marquee script", but please, tell me, that's a good solution? And one trouble - if i resize a window after loading script does not recalculating results
    function getClientWidth()
    {
    return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
    }
    var MyWidth = getClientWidth()- "120" + "px"



    //Specify the marquee's width (in pixels)
    var marqueewidth= MyWidth

  5. #5
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    First, try to give your function another name, getClientWidth is a JS function. Try to rename it into: setWidth, and add an event to check if the window is resized (onresize):
    Code:
    window.onresize=setWidth;
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

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
  •