Twitter Typeahead resources

  • Tags: /
  • Latest: 0.10.5
  • Last Updated: 14 October 2014
  • Grails version: 2.0 > *
0 vote
Dependency:
compile ":twitter-typeahead:0.10.5"

 Documentation  Source  Issues

Summary

Provides resource files the Twitter Typeahead library

Installation

Add
compile ":twitter-typeahead:0.9.3.2"

to BuildConfig.groovy

Description

Inspired by twitter.com's autocomplete search functionality, typeahead.js is a fast and fully-featured autocomplete library.

This plugins provides resource files for typeahead.js and CSS to style it when used with Bootstrap.

Including the resources

You can use either the resources or Asset-Pipeline plugins to use this plugin.

If you use the Grails resources plugin the following resources are exposed:

typeahead-js - The typeahead javascript typeahead-bootstrap-css - CSS to theme typeahead for usage with Bootstrap

To use Asset-Pipeline add the following to your Javascript code:

//= require typeahead

console.log("My javascript goes here");

Stylesheet (CSS):

/*
*= require typeahead-bootstrap-css
*/

Declare bootstrap resource module in GSP page header:

<r:require modules="typeahead-js"/>
<r:require modules="typeahead-bootstrap-css"/>

See https://github.com/twitter/typeahead.js to get started.