Skip to content

Mashblock/neat-complete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neat Complete

Build Status

A light-weight and library-less widget for simple autocompletion.

Integrating

Simple example using jQuery:

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <link href="./lib/neat_complete.css" rel='stylesheet'>
</head>
<body>
  <input type='text' id='ac_field' />

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script type="text/javascript" src='./lib/neat-complete.min.js'></script>
  <script type="text/javascript">
    var widget;

    $(document).ready(function(){
      widget = new NeatComplete.Widget(document.getElementById('ac_field'));
      widget.addService('demo',function(query, callback_fn){
        $.getJSON("/path/to/service.json", function(data){
          var results = $.map(data, function(result){
            return { value: result.name, data: result }
          });
          callback_fn(query, results);
        });
      });
    });
  </script>
</body>
</html>

See more examples.

Contributing

Prerequisites

Setup

$ npm install
$ bower install

Development Compiling

$ gulp serve

Production Compiling

$ gulp

Running Tests

$ gulp test

Deploying to Rails Assets

  1. Create a release on github, tagged with the version number
  2. Bower will automatically pick up the new version
  3. Make the new version available to Bundler by entering it on https://rails-assets.org/components/new

Documentation

Hosted on: http://coffeedoc.info/github/AbleTech/neat-complete/master/

About

A light-weight widget for simple autocompletion.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 61.6%
  • CoffeeScript 28.7%
  • HTML 8.6%
  • CSS 1.1%