Autocomplete 'select' event in IE7

Autocomplete 'select' event in IE7

  1. $('input#main_search_input').autocomplete({
    source: '/ajax/autocomplete/search.php',
    minLength: 3,
    select: function(event, ui) {
    alert('DEBUG: select event');

    if(ui.item.id.substr(0,3) == 'cat') {
    document.location = '/store/home.php?cat=' + ui.item.id.substr(4);
    } else {
    $('form#main_search_form').trigger('submit');
    }
    },
    open: function(event, ui) {
    $('.ui-autocomplete li:nth-child(2n)').addClass('odd');
    }
    });












Using the code above, the alert never gets called in IE 7 when I select a drop down result and hit the 'Enter' key. If I click it with my mouse it DOES work though.

jQuery 1.4.2
jQuery UI 1.8

Any help would be great.

Thanks,

John