I have a button that when clicked it closes the modal, in fact it does an action with CSS causing div
to disappear, being just the button to be clicked again and open the modal. But I'm not able to create a new action on the same button, but now to open it.
See the code below:
$(document).ready(function(){
$(".bt-fechar").click(function(e){
e.preventDefault();
$(".box-preco").css("right", "-245px");
});
});
After the first click that closes the modal, the second click should do the following:
$(".box-preco").css("right", "0");
Making the modal come to the home position by appearing on the screen. How can I do this?