SoFunction
Updated on 2025-03-04

Example of jQuery implementing countdown jump


<html>
  <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Jump page</title>
    <script src=""></script>
    <script language="javascript"><!--

        $(document).ready(function() {
            function jump(count) {
                (function(){
                    count--;
                    if(count > 0) {
                        $('#num').attr('innerHTML', count);
                        jump(count);
                    } else {
                        ="";
                    }
                }, 1000);
            }
            jump(3);
        });

// --></script>
  </head>    
  <body>  
<span style="color:red">Welcome to! </span><br/>The page will jump after 3 seconds...<br/><span >3</span> seconds left
  </body>
</html>