$.getScript
if ($.isFunction(jQuery.fn.autocomplete)){/* use official jQuery UI autocomplete */
$('#aj_au').autocomplete({
source: '/ajax_user.php?rt=j',
minLength: 2
});
} else {/* use jQuery plugins autocomplete */
$.getScript('/jslib/jquery/plugins/jquery.autocomplete.js', function() {
$('#aj_au').autocomplete('/ajax_user.php?rt=t', {
width: 150,
minChars: 2
});
});
}
沒有留言:
張貼留言