Hi guys I was trying to create a redirection jQuery code if a message was shown successfully.
https://hairscripts.shop/pages/enter-your-zip-code
$(function () {
if ($( "p.zippy-failure:contains('We deliver to your zipcode')").length > 0) {
window.location.replace("http://www.another-page.com");
}
});
sadly that's not working. I tried targeting it to a different CSS class and it worked but not on the successful message. Thank you in advance