Code Monkey home page Code Monkey logo

jquery-autocomplete-light's Introduction

jQuery Autocomplete Light Build Status Bower Version

Usage

  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  2. Include plugin's code:

    <script src="dist/jquery.autocomplete-light.min.js"></script>
  3. Call the plugin:

    $('#navigation_autocomplete').yourlabsAutocomplete({
        url: '/autocomplete/',
        choiceSelector: 'a',
    }).input.bind('selectChoice', function(e, choice, autocomplete) {
        document.location.href = choice.attr('href');
    });

Structure

The basic structure of the project is given in the following way:

├── demo/
│   └── index.html
├── dist/
│   ├── jquery.autocomplete-light.js
│   └── jquery.autocomplete-light.min.js
├── src/
│   ├── jquery.autocomplete-light.coffee
│   └── jquery.autocomplete-light.js
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── autocomplete-light.jquery.json
├── Gruntfile.js
└── package.json

Contains a simple HTML file to demonstrate your plugin.

This is where the generated files are stored once Grunt runs.

Contains the files responsible for your plugin, you can choose between JavaScript or CoffeeScript.

This file is for unifying the coding style for different editors and IDEs.

Check editorconfig.org if you haven't heard about this project yet.

List of files that we don't want Git to track.

Check this Git Ignoring Files Guide for more details.

List of rules used by JSHint to detect errors and potential problems in JavaScript.

Check jshint.com if you haven't heard about this project yet.

Definitions for continous integration using Travis.

Check travis-ci.org if you haven't heard about this project yet.

Package manifest file used to publish plugins in jQuery Plugin Registry.

Check this Package Manifest Guide for more details.

Contains all automated tasks using Grunt.

Check gruntjs.com if you haven't heard about this project yet.

Specify all dependencies loaded via Node.JS.

Check NPM for more details.

Guides

How did we get here?

I wanted a really simple autocomplete plugin, here's why this script is simpler than the others:

  • server-side rendering, use your favorite server-side framework, tell autocomplete what elements are choices by passing a choiceSelector on instanciation,
  • autocomplete and widget are loosely coupled, allowing to use only the autocomplete script for anything and implement your own logic by binding selectChoice,

I love this script because it never really gets in my way thanks to its simplicity which is an initial requirement.

Contributing

Check CONTRIBUTING.md for more information.

License

MIT

jquery-autocomplete-light's People

Contributors

jpic avatar dsanders11 avatar mpasternak avatar blueyed avatar vosi avatar sebcorbin avatar hongquan avatar emesik avatar gagarski avatar mazzly avatar bergsoft avatar sbaum avatar pandabuilder avatar tomds avatar thebao avatar krikunts avatar superzazu avatar stevellis avatar nseinlet avatar rhunwicks avatar raphaelkimmig avatar marcelometal avatar madeng84 avatar papalagichen avatar jahicks avatar vibragiel avatar ekohl avatar davidaurelio avatar askholme avatar alanjds avatar

Watchers

James Cloos 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.