Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Troubleshoot: JQuery stop() and clearQueue() Issue

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29548
    mat
    Member

    Hey guys,

    Take a look at this site i’ve got in dev atm:
    http://www.nwonline.co.uk/dev/regerme

    On the right hand side you’ll see the Post Comment section. The problem I’m having is that if you double click the dropdown button, then the hiiden div actually opens and closes. Also if you click spam it then it will queue the animation and repeatedly play the toggle animation.

    Now im using a toggle class to control the dropdown;

    Code:
    $(“a.expand”).click(function () {
    $(“div.expand”).slideToggle(“slow”).clearQueue();
    });

    I’ve tried both .stop() and .clearQueue() and i cant get either to work.
    If any of you guys could potentially help me out, it would of course be hugely appreciated!

    For Chris
    An article on the stop and queue functions in JQquery might be a good tutorial to show how they can be implemented with toggle, animate, slideup etc ?

    Just a suggestion :-)

    #79339
    Chris Coyier
    Keymaster

    You can always try removing animated elements from the selector before running an animation.

    Code:
    $(“#something”).not(“:animated”).doAnimation();
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.