Bootstrap typeahead - How to set the default value manually

后端 未结 3 1521
情话喂你
情话喂你 2021-01-12 07:34

I tried this:

$(\"#typeahead_object\").val(\"test\");

It only changes the textbox value but doesn\'t trigger the \'updater\' function

3条回答
  •  旧时难觅i
    2021-01-12 07:56

    As of typeahead.js 0.10.5, this works :

    $('#typeahead_object').typeahead('val', 'some value').blur()

提交回复
热议问题