0
我想在頁面加載後顯示#results
。但我不知道我應該使用什麼事件。任何幫助?jQuery Events加載
$(document).ready(function(){
//Live search
$("#search").on('keyup' ,function() {
//Input field value
var query = $(this).val();
$.post('search.php', { search: query}, function(cities) {
$('#results').stop(true,true).fadeIn(200).html(cities);
});//End ajax call
});//End on function
});//End document.ready state
只要把代碼中的事件,它的外面內部。 – PSL