open popover from typeahead list

后端 未结 1 1165
梦如初夏
梦如初夏 2021-01-28 18:37

I have a typeahead textfield from bootstrap. What I want to do is: When you click on an item from typeahead list they open a popover and it will be placed on the textfield. Is t

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-28 18:55

    Although the updater option is not documented, you can use it to do something when an item is selected : Demo (jsfiddle)

    $('#myTypeahead').typeahead({
        source: source,
        updater: function(item) {
            // Do something here, `item` is the selected item
            return item;
        }
    });
    

    0 讨论(0)
提交回复
热议问题