Tabs & Autocomplete
Tabs & Autocomplete
I am building an application and using tabs to load the content thru ajax requests. On one page I have content that is dynamicly loaded but I want to add an autocomplete option to the field.
The data I get back from my request is HTML. Is there any way to hook a autocomplete to an input field in the HTML on the fly?
This what i do:
- $("a.manage").live("click", function(event,ui) {
- $.ajax({
- get the data from a PHP file and get HTML code back
});
-
// find the input in the HTMLthat was returned and hook a autocomplete to it..
- $("#inhoud").find("#username").autocomplete({
source: availableTags // using demo code right now
});
});
- Any ideas?