我正在使用一个代码,在焦点上出现了一个ul,但是当我没有对焦时,它不会随着计时器的滑动而刚出来我也在使用ui-autocomplete搜索jquery也许这就是问题了吗?
$('#search-field').focus(function() {
$('ul.ui-autocomplete').slideDown('medium');
$(document).bind('focusin.ui-autocomplete click.ui-autocomplete',function(e) {
if ($(e.target).closest('.ui-autocomplete, #search-field').length) return;
$(document).unbind('.ui-autocomplete');
$('ul.ui-autocomplete').slideUp('medium');
});
});
$('ul.ui-autocomplete').slideUp('medium');