我在fancybox
.
问题来自于fancybox
覆盖div
包含结果的框。自动完成工作正常,但结果在后面(不可见)返回fancybox
我怎样才能解决这个问题?
$('#calendar-wrapper').on('click','#calendar td[data-day]',function(){
$.fancybox({href: '#newapp', title : 'New appointment' });
$("#newapp input[name='app_time']").val($(this).closest('tr').attr('data-hr')+':00:00');
$("#newapp input[name='app_date']").val($(this).attr('data-day'));
});////END OF FANCYBOX TRIGGER
var cache = {};
$(".ac").on('keyup.autocomplete', function(){
var fun = $(this).attr("data-ac");
var par=$(this).closest('FIELDSET');
var el=$(this);
par.find('input').not(this).val('');
par.find('select option:selected').removeAttr('selected');
$(this).autocomplete({
minLength: 2,
source: function( request, response ) {
var term = request.term,baseurl='<?=base_url()?>';
if ( term in cache ) {
response( cache[ term ] );
return;
}
var url=baseurl+'ajax/ac/'+fun+'/'+encodeURIComponent(term);
$.getJSON( url, '', function( data, status, xhr ) {
cache[ term ] = data;
response( data );
}).complete(function() {$('.ui-autocomplete-loading').removeClass('ui-autocomplete-loading'););
},
select: function(event, ui){
for (var key in ui.item)
{
var obj = ui.item[key];
var f=par.find('[name*="'+key+'"]').first();
if(f.length){
if(f.tagName == 'select'){
f.find('option[value="'+obj+'"]').first().attr('selected','selected');
}else{
f.val(obj);
}
}
}
},
messages: {noResults: '',results: function() {}}
});
});////END OF AUTOCOMPLETE
如何更改div
包含jquery-ui-ac
结果的 z-index 以将它们显示在fancybox
?