事件仿照

事件模仿$(function(){$(#old).bind(click, function(){$(input).trigger(focus)})$(#new).bi

事件模仿
$(function(){
    $('#old').bind("click", function(){
$("input").trigger("focus");
});
$('#new').bind("click", function(){
    $("input").triggerHandler("focus");
});
$("input").focus(function(){
            $("body").append("<p>focus.</p>");
        })
})


<button id="old">trigger</button>
<button id="new">triggerHandler</button>
<input />