Results 1 to 3 of 3

Thread: Jquery autocomplete

  1. #1
    Thread Starter
    Rookie donfriso's Avatar
    Join Date
    Jun 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jquery autocomplete

    Hey,

    first off, sorry but I'm terribly new at jquery...

    I was wondering how I can use the Jquery Autocomplete function.

    I found that theme-enqueue.php has the following line:

    Code:
     wp_enqueue_script('autocomplete', get_bloginfo('template_directory').'/includes/js/ui.autocomplete.js', array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'), '1.8.5');
    But I'm wondering how I can use that function.

    let's say my index has a <?php include 'test.php' ;?>

    And in that test.php is the following code (just a copy paste from the example on the jquery website) :

    Code:
    <script type="text/javascript">
        $(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
            });
        });
        </script>
    
    
    
    
        
    <div class="demo">
    
    
    <div class="ui-widget">
        <label for="tags">Tags: </label>
        <input id="tags" />
    </div>
    Now ofcourse I get the input box, but the autocomplete doesn't work. Can anyone be so kind to help me out?

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,932
    Thanks
    169
    Thanked 3,404 Times in 3,275 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Rookie donfriso's Avatar
    Join Date
    Jun 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Field Type: autocomplete (auto suggest)
    By juliuip in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 5th, 2011, 10:09 AM
  2. Javascript and jquery
    By garyb in forum JobRoller General Discussion
    Replies: 8
    Last Post: June 15th, 2011, 09:30 AM
  3. Classipress - wordpress "user messages" autocomplete conflict? Help!
    By reboot in forum ClassiPress General Discussion
    Replies: 3
    Last Post: March 19th, 2011, 12:33 PM