Skip to main content

I want to hide success hide success / errorerror messages after 5 seconds once I have added items to the cart.

I have extended messages.js with the following code to hide the message after 5 seconds

 setTimeout(function() {
            $(".messages").hide('blind', {}, 500);
        }, 3000); 

When I add item to the cart for the first time the message gets hidden after 5 seconds but when iI add another item to the cart the message is not showing up.

I want to hide success / error messages after 5 seconds once I have added items to the cart.

I have extended messages.js with the following code to hide the message after 5 seconds

 setTimeout(function() {
            $(".messages").hide('blind', {}, 500);
        }, 3000); 

When I add item to the cart for the first time the message gets hidden after 5 seconds but when i add another item to the cart the message is not showing up.

I want to hide success / error messages after 5 seconds once I have added items to the cart.

I have extended messages.js with the following code to hide the message after 5 seconds

setTimeout(function() {
    $(".messages").hide('blind', {}, 500);
}, 3000); 

When I add item to the cart for the first time the message gets hidden after 5 seconds but when I add another item to the cart the message is not showing up.

Source Link
Shami
  • 57
  • 1
  • 9

How to hide messages after certain time

I want to hide success / error messages after 5 seconds once I have added items to the cart.

I have extended messages.js with the following code to hide the message after 5 seconds

 setTimeout(function() {
            $(".messages").hide('blind', {}, 500);
        }, 3000); 

When I add item to the cart for the first time the message gets hidden after 5 seconds but when i add another item to the cart the message is not showing up.