0

I'm trying to implement JQuery UI's Autocomplete feature into a div that is initially hidden. I would assume I need to use the .live function, but I'm not sure how to implement that into the source they give. Any help?

$(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
        });
    });
1
  • @mu: figured it out. Essentially, I needed to call the function to add the available tags within the hidden div (I'm using PHP). That way, the tags show up. The autocomplete wasn't populating if I called the list from the header for some reason Commented Sep 4, 2011 at 23:39

1 Answer 1

1

The live function only works for attaching events, such as "click" or "hover" etc.

You can still use autocomplete on an input element that is hidden, and you can hide and show the element (or its containing DIV) as much as you like.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.