JQuery JavaScript Tutorial

< html>
  
    
    
        $(document).ready(function(){
        
            
            $("#old").click(function(){
              $("input").trigger("focus");
            });
            $("#new").click(function(){
              $("input").triggerHandler("focus");
            });
            $("input").focus(function(){
              $("Focused!").appendTo("body");
            });
               
        });
    
  
  
    
          .trigger("focus")
          .triggerHandler("focus")