function clickMe(el) { var $filter = $('#filter'); $filter.val(el.title); $filter.focus(); var e = jQuery.Event("keydown"); e.which = 13; $filter.trigger(e); }