Dropdown Results For Website Search
I am wondering if there is a service or solution to creating a website search that will allow me to have the results populate into a dropdown window below my search bar, rather tha
Solution 1:
I highly recommend using the jQuery Tokeninput plugin. I recently implemented this on a site for live searching functionality and it works perfectly.
The library provides options for styling every aspect of the search bar and dropdown results list.
Example:
<scripttype="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><scripttype="text/javascript"src="jquery.tokeninput.js"></script><linkrel="stylesheet"type="text/css"href="token-input.css" /><scripttype="text/javascript">
$(document).ready(function () {
$("#searchbar").tokenInput("/url_to_your_search_endpoint");
});
</script>
The plugin can be found, along with documentation, here: http://loopj.com/jquery-tokeninput/
Post a Comment for "Dropdown Results For Website Search"