diff options
author | Carl Porth <badcarl@gmail.com> | 2012-09-28 02:00:02 +0400 |
---|---|---|
committer | Carl Porth <badcarl@gmail.com> | 2012-09-28 02:00:02 +0400 |
commit | e1f6458e3640a628cdb6b2e4c63950777d46e141 (patch) | |
tree | cf4f67f4a214999cfb5024f6fbe12697b2c3cc17 /js/bootstrap-typeahead.js | |
parent | 474471b83140350de320f3ba940bd7dd8326b32e (diff) |
don't wait for ready when binding events to document
Diffstat (limited to 'js/bootstrap-typeahead.js')
-rw-r--r-- | js/bootstrap-typeahead.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index ab1d66879d..dc0c7fa07a 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -297,13 +297,11 @@ /* TYPEAHEAD DATA-API * ================== */ - $(function () { - $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { - var $this = $(this) - if ($this.data('typeahead')) return - e.preventDefault() - $this.typeahead($this.data()) - }) + $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { + var $this = $(this) + if ($this.data('typeahead')) return + e.preventDefault() + $this.typeahead($this.data()) }) }(window.jQuery); |