When you click the delete button it stops working, but I click on another button and it works again 2 more times, or at least it refreshes the browser to make it work again.
<script>
$(document).ready(function() {
$('.eliminarbt').click(function(e){
var ideliminar = $(this).attr("id");
$.ajax({
method: "POST",
url:"carrito.php",
data: {ideliminar:ideliminar},
success:function(data){
$('.table').html(data);
}
});
});
$('.btsiguiente').click(function(){
var total = parseInt($('#total').val());
if(total <= 0){
alert("Carrito Vacio");
}
else{
window.location.href='compra.php';
}
});
});
</script>