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

The Archive Base Latest Questions

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

I have a button with this behavior: it disappears once clicked; then a small

  • 0

I have a button with this behavior: it disappears once clicked; then a small message fade in for a couple seconds, fades out and the button reappears again.

To show the small message I append a element after my hidden button but need to remove it from the DOM once it has faded out. However, as soon as I use remove() in the chain the element is deleted and never fadeIn/fadeOut!

// the button is generated dynamically
$('#myButton').live('click', function() {
    $(this)
        .fadeOut() // once clicked, the button disappears

        .after('<small style="display:none;">Dans panier</small>') // append the message after the button

        .next('small').fadeIn() // fade the new small message for a smooth effect

        .delay(1000) // leave it visible for a second...

        .fadeOut() // then fade it out

        .remove() // <-------- normally I would have remove it here from the DOM because it should be hidden, but the remove() method seems to be bypassing the other ones and the small message never shows up!

        .end() // stop using this object and return to the button

        .delay(1000) // use the same delay as the small message so they are timed

        .fadeIn(); // show it back at the end
});
  • 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-18T08:15:07+00:00Added an answer on May 18, 2026 at 8:15 am

    If you want to remove it after the fadeOut, you can use the callback method:

    [...]
    .fadeOut(function(){ $(this).remove(); })
    

    But once you remove it, you must insert back in in the DOM for it to reappear with the fadeIn.

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

Sidebar

Related Questions

I have read this question and I am having the same problem: Put text
This is what i have so far: <dxe:ComboBoxEdit Name=cboUserCustomReports Width=300 Height=Auto Margin=0,5,0,5 ItemsSource={Binding Path=UserReportProfileList,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}
I have a form with some <button> elements and a normal <input type=submit> button
(I've changed the input tag with a button tag.) This probably is a stupid
So, this question may be a little vague, but I have constant discussions about
I have a Vsto Excel workbook (created in Visual Studio) which also contains a
I have a Vsto Excel workbook (created in Visual Studio) which also contains a
I have several fields on an Orbeon xform that are populated by a database
I have a usercontrol in my wpf application which is causing a stackoverflowexception to

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.