Combines an input and a button to fire the searched event.
This function includes a simple input and button group that styles with a search icon and fires the searched event.
Call the search control via JavaScript:
{% highlight js %}$('#mySearch').search();{% endhighlight %}To enable the search control without writing JavaScript, add data-initialize="search" to the .search element that you wish to initialize. Such elements that exist when $.ready() executes will be initialized. Any search markup that is programmatically created with data-initialize="search" sometime after the initial page load will not immediately initialize. Rather, it will initialize when the mousedown event is fired on it.
Wrap class="search" around an input and a button within a class="fuelux" container.
| Event Type | Description |
|---|---|
| searched.fu.search | This event fires when a user presses Enter within the input or clicks the button. |
| cleared.fu.search | This event fires when the user clears the input. |
All search events are fired on the .search classed element.
Wrap the input and search button within .fuelux .search