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 6845889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:33:22+00:00 2026-05-27T00:33:22+00:00

I have spent hours trying to figure this problem and i just can’t, so

  • 0

I have spent hours trying to figure this problem and i just can’t, so if you think you got what it takes please give me a hand.

I am writing jQuery code to add a delete button (iphone style) in a web app. However I can’t get it to hide the currently swiped delete when you swipe it for the second time (with intent to hide it). When you slide elsewhere it does hide the previous one.

Here is a jsfiddle example of the code by using click instead of swipe. You will notice if you click twice on the li it won’t hide the delete. But if you click eslewhere it does.

the real code is

$("li.swipeDelete").live("swipe",function(){
        var $th_btn = $(this).find(".aDeleteBtn");
        $(".aDeleteBtn").removeClass("fadeInLeft");
        $th_btn.toggleClass("fadeInLeft");
    });

Thanks 🙂

  • 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-27T00:33:23+00:00Added an answer on May 27, 2026 at 12:33 am

    I’m sorry to kill the party but right after i added it it came to me. Moving the removeClass after, and only removing the class if it already has class slideLeft and its NOT the current element.

    var $th_btn = $(this).find(".aDeleteBtn");
    $th_btn.toggleClass("fadeInLeft");
    $(".aDeleteBtn.fadeInLeft").not($th_btn).removeClass("fadeInLeft");
    

    I hope this can be used as a reference. I will also make a jquery plugin so everyone can enjoy this great feature.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there another way to do this? Just spent 2 hours trying to figure
I have now spent several hours trying to figure this out. I have this
I just spent the last 3 hours trying to figure out this error. I
I have a problem with php header redirect. I already spent hours trying to
Ok so I've spent a couple hours trying to resolve this issue and have
I hope this is a relatively easy problem although I have spent hours websearching
I have spent too much time on this problem and am beginning to think
Alright, I've spent about 5 hours trying to figure this out. Absolutely none of
I have an issue that I've spent hours trying to figure out, but since
I have spent hours trying to find an answer to this, and have come

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.