2010-12-06 12 views
1

私はオートコンプリート戻ってきた:jQueryのオートコンプリート - 結果リンク

$("#_results").autocomplete({ 
    source: data1, 
    minLength: 0, 
    selectFirst: true, 
    select: function(event, ui) { 
    if(event.keyCode == 13){ 
     window.open(ui.item.url); 
    } 
    }  
    }).data("autocomplete")._renderItem = function(ul, item) { 
    if(item.label == "No results found"){ 
    return $("<li></li>") 
    .data("item.autocomplete", item) 
    .append("<a href=\'#\' title='No results found' target=\'_self\'>" + "<span class='apptitle'>" + item.title + "</span>" + "<br />" + "<span class='descrip'>" + item.description + "</span>" + "</a>") 
    .appendTo(ul)  
    }  
    else if(item.support_url != ""){ 
    return $("<li></li>") 
    .data("item.autocomplete", item) 
    .append("<a href=\'" + item.url + "\' title='Click here to launch' target=\'_blank\'>" + "<span class='apptitle'>" + item.title + "</span>" + "<br />" + "<span class='descrip'>" + item.description + "</span>" + "<a href=\'" + item.support_url + "\' target=\'_blank\'><img src=\'http://supportcentral.ge.com/images/HELP_FORMS.GIF\' /><span class=\'supportText\'>Please click here for support</span></a>" + "</a> <hr width='80%' align='center'>") 
    .appendTo(ul) 
    }else{ 
    return $("<li></li>") 
    .data("item.autocomplete", item) 
    .append("<a href=\'" + item.url + "\' title='Click here to launch' target=\'_blank\'>" + "<span class='apptitle'>" + item.title + "</span>" + "<br />" + "<span class='descrip'>" + item.description + "</span>" + "<a href=\'http://supportcentral.ge.com/cases/case_log_quickcase.asp?prod_id=139545&cat_id=92831\'><img src=\'http://supportcentral.ge.com/images/HELP_FORMS.GIF\' /><span class=\'supportText\'>No support URL was provided. Please suggest one.</span></a>" + "</a> <hr width='80%' align='center'>") 
    .appendTo(ul)  
    } 
    }; 

を私が変更さかわからないが、私は結果をクリックすると、今ではHREFをトリガしません。私はそれを右クリックして "新しいウィンドウ/タブを開く"を選択することができます。また、Enterキーを押すと、URLが開かれます。しかし、マウスでそれをクリックしても、リストを隠す以外のことはしません(あたかもそうしたように)。 HTMLを見ると、私には正しいように見えます。

​​

誰でもアイデアはありますか?

答えて

0

jquery ui minの最新バージョンは、このクリックを破ったことが判明しました。私は古いバージョンに戻った。

関連する問題