Results 1 to 7 of 7

Thread: Slider works a bit crappy in Firefox

  1. #1
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Slider works a bit crappy in Firefox

    Hello everyone,

    This is my first post in here, but I hope there are some kind people out there who would like to help me with the following:

    This week I made a slider that reads out a HTML file for DIV's containting content. This content than can be slide in en out of the screen creating a pretty cool slider if I may say so.

    Anyway. The problem is that it is working fine in IE. And I cannot say it is a disaster in FireFox but it is just not so smooth as it is in IE.

    Well, maybe can tell me what problem this is and hopefully give me a good sollution.

    You can find the slider at:
    http://www.basslagter.com/DivSlider

    You can find a zipped sourcecode package at:
    http://www.basslagter.com/DivSlider/source.zip

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I can barely tell a difference here. I'm using FF 1.5.0.10. However, FF is well known for slower response to this type of javascript. By that I mean any javascript that relies upon repetitive incremental changes. CPU speed can help make up for that.

    Also, and I didn't look at your code, if there are two factors as there usually are with these sorts of things, if you decrease the interval or timeout milliseconds and the length of travel per iteration, it tends to smooth out the overall appearance of the motion. In other words, move the thing more frequently but not as far each time.
    Last edited by jscheuer1; 03-03-2007 at 03:38 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Okay, first I want to thank you for your reply.
    I did not know that Firefox was handeling such scripts other than IE.

    My script now moves the "frame" 1px every time at a various interval (settimeout). It does this until is has reached the width of the frame.

    I do not see how I can changes this into variable lengths of movement other than the 1px is does now. Maybe you (or someone else) has a example of how I can accomplisch that.

    Well, thanks again!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If the length of travel is already 1px, there is no wiggle room.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I know...maybe I should change that so I can get some more smooth transition. I'll try. Thanks again.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    If you increase both that and the interval (in the same proportion: if you double both the interval and the distance, the overall time taken will remain the same), you will get a less smooth but much faster experience, which will serve you well until Firefox 3 comes out.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have increased the distance to 3px a time...this helpt allot.
    Thanks!

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
  •