A light-weight and library-less widget for simple autocompletion.
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.
-
node.js - http://nodejs.org/
-
gulp - http://gulpjs.com/
-
bower - http://bower.io/
$ npm install
$ bower install
$ gulp serve
$ gulp
$ gulp test
- Create a release on github, tagged with the version number
- Bower will automatically pick up the new version
- Make the new version available to Bundler by entering it on https://rails-assets.org/components/new
Hosted on: http://coffeedoc.info/github/AbleTech/neat-complete/master/