Results 1 to 10 of 10

Thread: stepcarousel.js freeks out in ff

  1. #1
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default stepcarousel.js freeks out in ff

    1) Script Title: stepcarousel.js
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem:
    when viewing http://chattanoogacares.org with firefox the carousel begins scrolling wildly out of control if the page is displayed too long. i can leave the page open, virtually forever, in ie and no problem.

    help?
    shane

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

    Default

    How long? I tried for about 5 minutes or more, everything was fine.

    Is there any sequence of events, like things I could do to accelerate and/or bring on the problem?

    In any case, consider this - many scripts may behave erratically in any browser if left in an open window in the background while you do other things.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i just held it open <5 mins and it started . . . maybe it's just my machine. if you tested it for 5 and it didn't happen i'll rest o.k. that nobody is keeping any page open for longer (except me).

    thanks for testing it!
    shane

  4. #4
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I've seen the same problem with Step Carousel in firefox. The script worked fine in FF3.5. I recently updated to FF5 and I've seen the carousel go crazy. Here is what I'm seeing. This is on a stepcarousel script that has the images automatically cycling on page load.

    After loading the page and staying on the page the script works fine. If you start browsing a different webpage on another tab while leaving your other site open for a long time and then come back to the stepcarousel site, the stepcarousel images will cycle through extremely fast as if it is catching up the amounts of cycles it should have made while you were browsing the different web page tab. Because after a while I see the images stop cycling fast and return to normal after a short period of time!!!!!!!!

    Any help in fixing this??????????????

    FYI: This seems to happen in the latest Chrome browser as well
    Last edited by jughead47; 08-11-2011 at 03:10 PM.

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

    Default

    Ah, well that does happen with the page linked to in the first post here. And I had mentioned that it (behaving erratically) could happen with many javascript pages left in the background.

    It's a gray area, as long as it settles down, this one does, it isn't a huge problem. But I certainly can see how it could bother the page's owner and/or designer.

    There might be a bug report out on it. If so, there might be advice to script authors on how to avoid it. Or some idea given on what's being done about it.

    My best guess is that bug or not it's the browser cutting down on CPU requests on background pages in order to boost the performance of the foreground page. They just went a little overboard.

    Ah, a quick Google brought this link:

    http://support.mozilla.com/en-US/questions/843838

    It mentions that with jQuery animations, which this script uses, one must avoid looping them with setTimeout and setInterval. This script uses setInterval for that purpose. So it would require what would probably be a fairly complex rewrite to avoid this problem. But at least a solution (two possible solutions actually) is given in the second response. Whether or not that would actually work would require some testing on top of said rewrite.

    When I have more time though, I'll look into it, as I have one script I'm just now developing that also uses the setInterval, but even though it makes extensive use of jQuery, I don't think it uses setInterval on jQuery animations, so perhaps it will be OK.

    None that I have written for Dynamic Drive, but many Dynamic Drive scripts use the setInterval and/or the setTimeout to loop jQuery animations. So this is an issue Dynamic Drive should know about.
    - John
    ________________________

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

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jughead47 (08-11-2011)

  7. #6
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Any suggestions on a fix to this that doesn't require a rewritten major code overhaul?

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

    Default

    First I'd try updating the version of jQuery, they may have fixed this. Change:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    to:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    If that doesn't help, I'd look into other similar scripts. Not any on Dynamic Drive though, at least none that use jQuery.

    This one looks similar:

    http://cssglobe.com/post/5780/easy-s...-jquery-slider

    And in limited testing doesn't appear to have that problem in Firefox at least.

    Try out their demo page:

    http://cssglobe.com/lab/easyslider1.7/01.html

    Let me know if it works OK for you in those browsers.
    Last edited by jscheuer1; 08-11-2011 at 07:32 PM. Reason: Thought of another idea
    - John
    ________________________

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

  9. #8
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    The jquery version update had no effect for me. I guess implementing a new script will be the route for me. Thanks for the help John.

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

    Default

    I feel I must amend my previous post. Some of the scripts on Dynamic Drive, well at least one (Ultimate Fade In Slideshow) that uses jQuery animations in a loop does it the right way. So I suppose others may as well. The Step Carousel doesn't though.

    Upon further testing, if you revert jQuery to version 1.4.2 - the version listed on the demo page, it works fine. Version 1.4.2 had some other issues, but version 1.4.4 is OK too and doesn't have 1.4.2's problems. Even 1.5.2 seems fine. Apparently this bug starts with jQuery version 1.6.x.
    Last edited by jscheuer1; 08-15-2011 at 04:18 AM. Reason: merge posts
    - John
    ________________________

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

  11. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jughead47 (08-16-2011)

  12. #10
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Yes. I changed to the 1.4.4 version and it worked! All is well. Thanks again!

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
  •