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:
authorfat <jacobthornton@gmail.com>2012-12-08 04:16:48 +0400
committerfat <jacobthornton@gmail.com>2012-12-08 04:16:48 +0400
commit820a3b27b6cfd320584be5a8e1652c7dff9771e4 (patch)
tree989995e4b9dd43f5492254a3e4b439ecc13acffd /docs/assets/js/bootstrap-typeahead.js
parent1747caf19d59cad7fdc90ae56a00e0e2849f95f4 (diff)
get tests passing for typeahead :P
Diffstat (limited to 'docs/assets/js/bootstrap-typeahead.js')
-rw-r--r--docs/assets/js/bootstrap-typeahead.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js
index 3c9153c9b3..088e7ce9b9 100644
--- a/docs/assets/js/bootstrap-typeahead.js
+++ b/docs/assets/js/bootstrap-typeahead.js
@@ -33,8 +33,8 @@
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).insertAfter(this.$element)
this.source = this.options.source
+ this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
@@ -60,12 +60,14 @@
height: this.$element[0].offsetHeight
})
- this.$menu.css({
- top: pos.top + pos.height
- , left: pos.left
- })
+ this.$menu
+ .insertAfter(this.$element)
+ .css({
+ top: pos.top + pos.height
+ , left: pos.left
+ })
+ .show()
- this.$menu.show()
this.shown = true
return this
}