bootstrap typehead - dropdown, global position« Wróć do listy pytań

mod
Wysłane przez mrmucha
Zadane przez 19/06/2018 11:39
0

1. (warning, modify orginal files, version 0.0.5) open bootstrap-typehead.js
2. find line (~32)

1
that.$menu = $(that.options.menu).insertAfter(that.$element);
      that.$menu = $(that.options.menu).insertAfter(that.$element);

change to

1
that.$menu = $(that.options.menu).appendTo("body");
that.$menu = $(that.options.menu).appendTo("body");

3. find line (~119) and change

1
var pos = $.extend({}, this.$element.position(), {
var pos = $.extend({}, this.$element.position(), {

to

1
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.offset(), {

4. add style

.typeahead { position:absolute !important; z-index:10000; }​

Wysłane przez mrmucha
Odpowiedziane 19/06/2018 11:41