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 03:59:13 +0400
committerfat <jacobthornton@gmail.com>2012-12-08 03:59:13 +0400
commit1747caf19d59cad7fdc90ae56a00e0e2849f95f4 (patch)
tree90cb7c8ea89c4644865954582c5ba2ec9ccbb935 /docs/assets/js/bootstrap-typeahead.js
parent437654030aa283b92a260245b54fa17a417c20d8 (diff)
insert menu of typeahead after input which it suggests on #3529
note: this will likely break things for people in the same way that doing this to tooltip did… however we think this is a better insertion model for z-index,scrolling,modal,etc. applications
Diffstat (limited to 'docs/assets/js/bootstrap-typeahead.js')
-rw-r--r--docs/assets/js/bootstrap-typeahead.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js
index 387fd2a6d4..3c9153c9b3 100644
--- a/docs/assets/js/bootstrap-typeahead.js
+++ b/docs/assets/js/bootstrap-typeahead.js
@@ -33,7 +33,7 @@
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.$menu = $(this.options.menu).insertAfter(this.$element)
this.source = this.options.source
this.shown = false
this.listen()
@@ -56,7 +56,7 @@
}
, show: function () {
- var pos = $.extend({}, this.$element.offset(), {
+ var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})