Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What libraries do I need to import in order to use jQuery Autocomplete

I have been tinkering with the jQuery autocomplete, and I got some parts of it to work here: http://problemio.com/test.php

Now I am working from this article: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/

And this article says I need to download these libraries: Core, Widget,Position and use their css also.

I already import this on my page:

          <link rel="stylesheet" type="text/css" href="http://jqueryui.com/themes/base/jquery.ui.all.css"/>

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>

<script type="text/javascript" src="http://www.problemio.com/js/problemio.js"></script>

so does that mean I need to import some more libraries? Which ones exactly? The example tutorials suggest I download the libraries, what is the main difference between downloading the libraries and just importing them? Also, even if I download them, what should the paths point to since the libraries have more than 1 file?

Thanks!!

like image 787
GeekedOut Avatar asked Dec 20 '25 05:12

GeekedOut


1 Answers

The answer is always in the source,

/*
 * jQuery UI Autocomplete 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Autocomplete
 *
 * Depends:
 *  jquery.ui.core.js
 *  jquery.ui.widget.js
 *  jquery.ui.position.js
 */

And from Autocomplete

The jQuery UI Autocomplete plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.

If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.autocomplete.css stylesheet that can be modified. These classes are highlighed in bold below.

I recommend reading the Getting Started info before continuing.

like image 199
Andrew Avatar answered Dec 22 '25 19:12

Andrew