How to animate any click event [duplicate]

85
January 16, 2022, at 1:30 PM
This question already has answers here:
How can I fade out a div using jQuery? (7 answers)
Slide right to left? (16 answers)
jQuery UI show / hide with a slide effect - how to change the slide "back-in" speed (3 answers)
Closed yesterday.

I have written this code to remove an element now I want give any effect to it using jQuery

where I can add animate function to it or any other

  $(".close-btn").each(function(element){
    $(this).on('click', function(){
      $(this).closest('div.card').remove();
    }); 
  });
}

I have Tried do it like this

$(this).closest('div.card').hide('slow').remove();

but this didn't worked

Rent Charter Buses Company
READ ALSO
Checking my math for distance between 2 points in miles

Checking my math for distance between 2 points in miles

Hello I am trying to do a calculator of finding the distance between 2 pointsEverything works properly

119
How can I make a Horizontal scrolling nav bar that also works with mobile

How can I make a Horizontal scrolling nav bar that also works with mobile

So I have a website about the NBA and the problem is there is 30 teams in the NBAWhen I make a nav bar it takes up half the page because there is 30 teams lol

68
Mongodb updateMany() not working in nodejs

Mongodb updateMany() not working in nodejs

I have a collection called imported_products with documents as following,

100
How to use regular expression in ObjectBox

How to use regular expression in ObjectBox

I want to implement regular expression in ObjectBox databaseSomething like -

106