jQuery(function($) { $("html").live("keydown",function(e){ if(e.keyCode == 13){ doSearch(); } }); });