我正在使用jquery UI自动完成.它适用于除IE7之外的所有其他浏览器FF,Chrome等.适用于更高版本的IE,但IE7给出以下错误:
SCRIPT3: Member not found.
jquery.min.js, line 2 character 30636
Run Code Online (Sandbox Code Playgroud)
这是我的功能:
$('input.autocomplete').each( function() {
var $input = $(this);
// Set-up the autocomplete widget.
var serverUrl = $input.data('url');
$(this).autocomplete({
source: function( request, response ) {
var countrySelect = $("#countrySelect").val();
if($input.attr('id') == 'searchJobPostalCode'){
countrySelect = $("#searchJobCountrySelect").val();
}else if($input.attr('id') == 'searchPeoplePostalCode'){
countrySelect = $("#searchUserCountrySelect").val();
}
$.ajax({
url: serverUrl,
dataType: "json",
data: {
term: request.term,
countrySelect: countrySelect
},
success: function( data ) {
$input.removeClass( "ui-autocomplete-loading" );
response( $.map( data, function( item ) { …Run Code Online (Sandbox Code Playgroud) jquery-ui ×1