Add submit button after search input

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

add_action( ‘wp_head’, function() {
?>
<script>(function($) {
$(document).on(‘facetwp-loaded’, function() {
$(‘.facetwp-input-wrap’).each(function() {
if ($(this).find(‘.facetwp-search-submit’).length < 1) {
$(this).find(‘.facetwp-search’).after(‘<button class=”facetwp-search-submit” onclick=”FWP.refresh()”>Submit</button>’);
}
});
});
})(jQuery);
</script>
<?php
}, 100 );

{{/gist}}