当我将 zoomooz.js 放入带有 jqueryui 自动完成功能的网页时,它只在第一次工作,下拉菜单不再接受鼠标点击。为了工作,我将鼠标移动到目标上,然后单击键盘上的 Enter 键。
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zoomooz/1.1.6/jquery.zoomooz.min.js"></script>
<script>
$( function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
} );
</script>
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
<img class="zoomTarget" data-targetsize="0.05" data-closeclick="true" src="file.png">