Ben-Nasha Posted March 27, 2011 Share Posted March 27, 2011 Iv got this jquery countdown it should say Redirecting 10,9 and go on and then redirect but it wont i dont know whats wrong with it.... <html> <head> <title> Redirecting... </title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { var number = 10; var url = 'http://www.google.co.uk'; function redirect(number,url) { number = number; url = url; countdown(); } function countdown () { setTimeout(countdown,1000); $('#redricting').html("Redirecting in " + number + " seconds"); number --; if (number<0) { window.location = url; number = 0; } } </script> </head> <body> <div id="redirecting"> Redirecting box </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted March 27, 2011 Share Posted March 27, 2011 Perhaps you would be better explaining what your trying to achieve. I dont see why you would want to use this. Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted March 27, 2011 Share Posted March 27, 2011 You should really try looking for typo's in your code ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.