Add close & open method typeahead in $

Changes:
* add close & open method in the plugin
* add unit test to typeahead.js