Here is our current code:
$('#click').click(function(e){
var country = $("#country").val();
$this = $("#conv");
$this.css({"text-align":"center","font-size":"18px"});
$this.html("<div style='margin-top: -4px;'>We're sorry but this website is not available in your country <strong>(" + country + ")</strong><br /><br /><a href='http://www.site.com/'>Please click here to visit our partner website!</a></div>")
});
Basically, we want the HTML to say:
Please click here to visit our partner website or you’ll be
automatically redirected in 5 seconds!
We want the 5 seconds to count down, so it’ll go 5, 4, 3, 2, 1 and then redirect to the website.
How can I do a counter and redirect the user? I’m guessing setTimeout() along side a count variable and $count-- with a window location href?
Thank you
Something like this:
JS: