I am making a small script that the element should disappear for only 2 seconds, and then return to appearing alone, I leave the link here Fiddle
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('img').click(function() {
$(this).fadeOut();
setTimeout(function() {
$(this).fadeIn();
}, 1000);
});
});
</script>
im trying to use attenuation and set time but not working
source
share