jQuery: preventing event from executing for duration of animation -


OK, I've checked this thread:

    < Li>

    and attempted to recapture / recapture as an incident but there is no benefit. I basically have a slider gallery with a front / back button. I want to stop clicking the next button for the duration of the animation.

      prev = $ ("# portfolio_nav_prev"); Next = $ ("# portfolio_nav_next"); Forward the function to the next anonym () {// handler. Unbund (); Gallery_frame.animate ({scrollLeft: targetPos}, 300, 'ComfortInquote', function () {next.bind (nextAnim)}); return false; }  

Any thoughts?

Here is the solution that I have finished - The problem was that the element was an anchor, so When I used to unbound the click animation - it tried to navigate away from the page, thus breaking the animation.

So, I unbound this event, then click force to return to the wrong:

  next.unbind (); Next.click (function () {return false;})  

Then it was done in the animation callback, but it was bound back to the animation

  Gallery_frame.animate ({scrollLeft: targetPos}, 300, 'smoothInOutQuart', function () next.unbind (); next.bind ('click', nextAnim)});  

However, I think the real solution is to make the next / previous button from some non-anchor element in the first place.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -