Home > jQuery > How Do I Setup a Redirect Using Javascript or jQuery?
Bookmark and Share

How Do I Setup a Redirect Using Javascript or jQuery?

Posted on March 22, 2018 | Filed in jQuery

Redirecting in Javascript can be useful after checking form data, but how do we do it? We can do it with pure Javascript like this:

window.location.href = "http://www.bigappledesigns.com";

If for some reason you want to do jQuery instead of pure Javascript to do the redirect then you can use this:

jQuery(location).attr('href', 'http://www.bigappledesigns.com')

Leave a Reply