How to hide notification messages
like success message after adding product to cart or any error messages or notices after few seconds after they appear on the the frontend using knockout js
.
Example : When I am adding a product in the cart, a success message appear saying "product has been added to your cart". I want to hide this success message after 5 seconds after it appear on the screen.
Best Answer
Try following way:
Vendor/Module/view/frontend/requirejs-config.js
Vendor/Module/view/frontend/web/js/view/messages.js
Clear cache.