Removing alert box when click on the Add to Cart button | Adobe Business Catalyst

<span class="cartalert" style="display:none"></span>
<style>
.cartalert {
position: fixed;
bottom: 10%;
right: 10%;
padding: 15px 20px;
text-align: center;
background: #333;
color: #fff !important;
z-index:999999;
border-radius: 5px;
font-size: 16px;
}
</style>
<script>
$(function() {
window.alert = function(msg) {
msg = msg.replace('ERROR: ','');
$('.cartalert').text(msg).fadeIn().delay(1000).fadeOut()
}
});
</script>

No comments:

Post a Comment