Hello friends, I'm in need of some help with my code.
$(document).ready(function() {
var circle = $('.circle');
$(".send a").click(function(e) {
e.preventDefault();
$('.wrap').css('display', 'block');
if (circle.hasClass('bounceInLeft')) {
circle.removeClass('bounceInLeft').addClass('bounceOutRight');
}
else
{
$('.circle').addClass('animated bounceOutRight');
circle.removeClass('bounceOutRight').addClass('bounceInLeft');
}
});
});
If you click on .send a
, then .wrap
will become visible by having its display set to 'block'. How can I make it so that when you click on .send a
for a second time, .wrap
goes back to being hidden (display: none
)? I know the code should look something like this:
$('.wrap').css('display', 'none');
but I'm not sure where exactly to include this piece of code...
.wrap {
max-width: 400px;
margin: 4em auto;
text-align: center;
display:none;
background-color:#fff;
}