Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-04-17 04:36:03 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-04-17 04:36:03 +0400
commitf3cf4cbaae8c3b3aaed299b63d1773d85cd7789a (patch)
tree73653cfc9a175b306ee45dff2d6b5722789c498a /docs/assets/js/bootstrap-typeahead.js
parentba202d77baa35125a521224d9a55ec013fc3ccfa (diff)
rebuild
Diffstat (limited to 'docs/assets/js/bootstrap-typeahead.js')
-rw-r--r--docs/assets/js/bootstrap-typeahead.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js
index 526cf320c3..4c562f7536 100644
--- a/docs/assets/js/bootstrap-typeahead.js
+++ b/docs/assets/js/bootstrap-typeahead.js
@@ -32,6 +32,7 @@
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
+ this.updater = this.options.updater || this.updater
this.$menu = $(this.options.menu).appendTo('body')
this.source = this.options.source
this.shown = false
@@ -45,11 +46,15 @@
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
- .val(val)
+ .val(this.updater(val))
.change()
return this.hide()
}
+ , updater: function (item) {
+ return item
+ }
+
, show: function () {
var pos = $.extend({}, this.$element.offset(), {
height: this.$element[0].offsetHeight