我做错了什么?
在控制台中尝试了这一点,但是预先输入不起作用。没错。
→ $("#to_folder_name").typeahead({"source": DS.folders_names_array})
← [<input type="text" data-provide="typeahead" id="to_folder_name" size="15" placeholder="Move to..."]
→ DS.folders_names_array
← ["hhhhhhh", "dddssss", "Root", "Default", "Archive", "Custom", "1A", "after SaveExistingLocation_Test", "Hanny", "ggggg", "ggg123", "new folder", "new folder2", "dddddd", "new folder4", "ggg"]
→ $("#to_folder_name")
← [<input type="text" data-provide="typeahead" id="to_folder_name" size="15" placeholder="Move to...">]
包含typeahead.js。
答案 0 :(得分:0)
在.typeahead(?
之后)取消“来源”周围的引号