diff options
author | fat <jacobthornton@gmail.com> | 2012-12-08 02:06:01 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2012-12-08 02:06:01 +0400 |
commit | a7eb9c294a575b5471ddec45ae75e1d09f7ace4c (patch) | |
tree | e55d0f54282e2f9f41c7ba87254e2ab9928f10ee /js/bootstrap-typeahead.js | |
parent | 1c5b8e967e2b421503bc010d4ed3b79406ea5b7b (diff) |
add noConflict functionality to all bootstrap plugins
Diffstat (limited to 'js/bootstrap-typeahead.js')
-rw-r--r-- | js/bootstrap-typeahead.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index 512d91acb4..9b123fb3fb 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -276,6 +276,8 @@ /* TYPEAHEAD PLUGIN DEFINITION * =========================== */ + var old = $.fn.typeahead + $.fn.typeahead = function (option) { return this.each(function () { var $this = $(this) @@ -297,7 +299,16 @@ $.fn.typeahead.Constructor = Typeahead - /* TYPEAHEAD DATA-API + /* TYPEAHEAD NO CONFLICT + * =================== */ + + $.fn.typeahead.noConflict = function () { + $.fn.typeahead = old + return this + } + + + /* TYPEAHEAD DATA-API * ================== */ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { |