textarea autocomplete phpmyadmin style

Solutions on MaxInterview for textarea autocomplete phpmyadmin style by the best coders in the world

showing results for - "textarea autocomplete phpmyadmin style"
Erika
15 Nov 2020
1$(function () {
2$("document").ready(function () {
3    var availableTags = [
4        "ActionScript",
5        "AppleScript",
6        "Asp",
7        "BASIC",
8        "C",
9        "C++",
10        "Clojure",
11        "COBOL",
12        "ColdFusion",
13        "Erlang",
14        "Fortran",
15        "Groovy",
16        "Haskell",
17        "Java",
18        "JavaScript",
19        "Lisp",
20        "Perl",
21        "PHP",
22        "Python",
23        "Ruby",
24        "Scala",
25        "Scheme"];
26
27    $("#tags").on("keydown", function () {
28        var newY = $(this).textareaHelper('caretPos').top + (parseInt($(this).css('font-size'), 10) * 1.5);
29        var newX = $(this).textareaHelper('caretPos').left;
30        var posString = "left+" + newX + "px top+" + newY + "px";
31        $(this).autocomplete("option", "position", {
32            my: "left top",
33            at: posString
34        });
35    });
36
37    $("#tags ").autocomplete({
38        source: availableTags
39    });
40});
41
42});
similar questions
queries leading to this page
textarea autocomplete phpmyadmin style