我正在使用从git获取的tageditor(请参见此处:np.ndarray.ravel
),建议的自动完成字的位置出现问题,它们出现在窗口上方而不是textarea tageditor下方。 ...我该如何解决?
您可以在此处查看演示页面:
https://github.com/Pixabay/jQuery-tagEditor
这是我的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tagEditor pixabay</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script src="https://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script src="/js/jquery.caret.min.js"></script>
<script src="/js/jquery.tag-editor.js"></script>
<script src="/js/jquery.tag-editor.min.js"></script>
<link rel="stylesheet" href="/css/jquery.tag-editor.css"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
</head>
<body>
<br /><br />
<div class="container" style="width:600px;">
<h2 align="center">Autocomplete Textbox using tagEditor</h2>
<br /><br />
<label>Search Programming language</label>
<textarea id="tags" name="tags" placeholder="Afegir atributs"></textarea>
</div>
</body>
</html>
<script>
$('#tags').tagEditor({
initialTags: ['Pascal'],
placeholder: 'Enter tags ...',
autocomplete: {
delay: 0, // show suggestions immediately
minLength: 0,
position: { my: "center top", at: "center bottom"}, // automatic menu position up/down
source: ['ActionScript', 'AppleScript', 'Asp', 'BASIC', 'C', 'C++', 'CSS', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Groovy', 'Haskell', 'HTML', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python', 'Ruby', 'Scala', 'Scheme','Père']
},
});
</script>
谢谢