twitter bootstrap - Implement typeahead such that items are links -
how can implement bootstrap-typeahead.js in such way looks @ long list of links , suggested options clickable take specific page?
for example, on twitter's site, if search in searchbox, matches specific people return links allow click them go directly page rather having search them. default, typeahead replaces current input result click rather taking page corresponds link.
the list bunch of hyperlinks.
you can make typeahead source
list of links, , use updater
function navigate selected link. see answer to: utilizing bootstrap's typeahead search function
if want show actual urls (links) in typeahead this..
var links = [ "/login", "/", "/user", "/tags" ]; $('.typeahead').typeahead({ minlength:2, updater: function (item) { /* navigate selected item */ window.location.href = item; }, source: links });
Comments
Post a Comment