There is no ui-autocomplete class in your fiddle. Therefore, I assume that it looks like this:
<input type = 'text' class = 'search ui-autocomplete' />
and also there is no ui-menu-item class in your fiddle, so you should do like this:
$('.ui-autocomplete').on('keypress', function(e){ if (e.which == 13) { e.preventDefault(); $('.college').trigger('click'); } });
Updated Fiddle
If you want to use a class that is automatically created from the jQuery user interface, you can do:
$('.ui-autocomplete-input').on('keypress', function(e){ if (e.which == 13) { e.preventDefault(); $('.college').trigger('click'); } });
Fiddle
source share