mikejmoran of Speak Creative
3/19/2019 - 7:45 PM

Custom Search

in case you need to hardcode a site search

<div class="custom-search-panel">
	<input type="text" id="custom-search-field" placeholder="What are you looking for?" />
	<select id="custom-search-category">
		<option value="">Category</option>
		<option value="Events">Events</option>
		<option value="News">News</option>
		<option value="Staff">Staff</option>
	</select>
	<button type="button" id="custom-search-button">Search</button>
</div>

<script>
$(function () {
  $('#custom-search-button').click(function () {
    console.log(
      '/SearchResults.aspx?s=' + $('#custom-search-field').val() + '&refinement=' + $('#custom-search-category').val()
    )
  })
});
</script>