Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3627282
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:52:07+00:00 2026-05-18T23:52:07+00:00

How to stop an animation and resume later with jQuery? For example, I’ve this

  • 0

How to stop an animation and resume later with jQuery?

For example, I’ve this and i want to avoid the slide-up if the user is dragging another item.

example here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:52:08+00:00Added an answer on May 18, 2026 at 11:52 pm

    Have a look here jQuery stop()

    That’ll do what you need.

    Edit: I’ve had a look at the code and I think i’ve got it.
    I’ve added some boolean variables to check against to determine whether the a slideUp should occur.

    $(function() {
        var item = $("#items .item");
        var slider = $(".slider");
        var droppable = $("#favorite");
        var dropComplete = false;
        var dragging = false;
    
        item.draggable({
            opacity: 0.75,
            helper: "clone",
            start: function() {
                // set variables for drag and drop.
                dropComplete = false;
                dragging = true;
                slider.slideDown().clearQueue();
            },
            stop: function(){
                // drag has been abandoned.
                dragging = false;
    
                setTimeout(function () { 
                 if (dragging === false && dropComplete === false){
                     slider.clearQueue().slideUp();
                 } 
                 }, 3000);
    
                }
    
        }).disableSelection();
    
        droppable.droppable({
            tolerance: 'pointer',
            drop: function(event, ui) {  
                $('.last.item').replaceWith($(ui.draggable).clone().addClass('last'));
                //alert(ui.draggable.attr('id').substring(6));
                // drop is complete.
                dropComplete = true;
    
             setTimeout(function () { 
                 if (dropComplete === true){
                     slider.clearQueue().slideUp();
                 } 
             }, 3000);
    
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JQuery animation plugin for ul elements taken from this tutorial but when
How to stop an animation so it won't produce Completed event. Here's simple example
For CAKeyframeAnimation, there are delegates for animation start and animation stop. But I want
I'm wondering how to stop an animation made with jQuery timers. I think I
I want to stop an animation at the last frame, and after that after
I am trying to use animation using jquery. When i mouseover the element, it
I have the following animation: http://jsfiddle.net/jtqcj/2/ jQuery(#fp-small-feature-1).mouseenter(function(){ jQuery(.bar).animate({width: 264px},500); }); jQuery(#fp-small-feature-1).mouseleave(function(){ jQuery(.bar).animate({width: 0px},800); });
I need to make an animation which will accelerate when the user keeps a
I've looked at all these posts: jQuery stop fadein during fadeout jQuery stop "click"
I have a jQuery animation that animates the 'scrollLeft' on a container to produce

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.