Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

textarea autocomplete phpmyadmin style

$(function () {
$("document").ready(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").on("keydown", function () {
        var newY = $(this).textareaHelper('caretPos').top + (parseInt($(this).css('font-size'), 10) * 1.5);
        var newX = $(this).textareaHelper('caretPos').left;
        var posString = "left+" + newX + "px top+" + newY + "px";
        $(this).autocomplete("option", "position", {
            my: "left top",
            at: posString
        });
    });

    $("#tags ").autocomplete({
        source: availableTags
    });
});

});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #textarea #autocomplete #phpmyadmin #style
ADD COMMENT
Topic
Name
6+4 =