GithubHelp home page GithubHelp logo

herimedia / jquery-tokenizing-autocomplete-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dropio/jquery-tokenizing-autocomplete-plugin

1.0 1.0 0.0 122 KB

This is a jQuery plugin to allow users to select multiple items from a predefined list, using autocompletion as they type to find each item.

Home Page: http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/

JavaScript 100.00%

jquery-tokenizing-autocomplete-plugin's Introduction

=================================================
jQuery Plugin: Tokenizing Autocomplete Text Entry
       By James Smith - http://loopj.com
=================================================

Overview
--------
This is a jQuery plugin to allow users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.


License
-------
This plugin is licensed under both the GPL and MIT licenses. Choose which ever one suits your project best.


How to Use This jQuery Plugin:
------------------------------
* Make sure you have jquery script included on your page
* Include jquery.tokeninput.js on your page
* Include one of the provided stylesheets, or make your own
* Create a server-side script (php/rails/django anything goes) to generate the search results.
  The script itself can fetch data from wherever you like, for example a database or a hardcoded list, but it must do the following:
      o Take exactly one GET parameter named โ€œqโ€ which will contain the query string. E.g. http://www.example.com/myscript?q=query
      o Output JSON search results in the following format:

        [{"id":"856","name":"House"},
         {"id":"1035","name":"Desperate Housewives"},
         {"id":"1048","name":"Dollhouse"},
         {"id":"1113","name":"Full House"}
        ]

* Turn text inputs into tokeninputs using jQuery and point them to your results script:

  <script type="text/javascript">
  $(document).ready(function () {
    $("#my-text-input").tokenInput("/url/to/your/script/");
  });
  </script>

* A list of selected item ids is created inside the original text entry, process them as usual when the form is submitted.

jquery-tokenizing-autocomplete-plugin's People

Contributors

liferealized avatar loopj avatar niels avatar tholder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.