Reputation: 19
I use $(selector).remove();
in jQuery to remove some elements, and want to be able to return those after I deleted them.
How can I return them when they are removed?
My code:
$("#cir1").click(function(){
$("#cir2").fadeOut(100);
$("#cir2").remove();
$("#con2").fadeOut(100);
$("#cir3").fadeOut(100);
$("#cir3").remove();
$("#con3").fadeOut(100);
$("#cir4").fadeOut(100);
$("#cir4").remove();
$("#con4").fadeOut(100);
$("#cir1").animate({
width:'590px',
height:'590px',
borderRadius:'800px',
left:'-2px',
top:'-3.5px',
});
$(".matt").fadeOut(100);
$("#con1").fadeOut(100);
$("#abcon").fadeIn(300);
});
$("#back").mouseenter(function(){
$("#cir1").animate({
width:'195px',
height:'195px',
borderRadius:'100px',
});
$(".matt").fadeIn(100);
$("#abcon").fadeOut(300);
$("#cir2").fadeIn(100);
$("#cir3").fadeIn(100);
$("#cir4").fadeIn(100);
});
Upvotes: 1
Views: 156