Show the reset button only when facets are active

mgibbs189

{{gist file=”test.php” lang=”php”}}
<script>

(function($) {
$(document).on(‘facetwp-loaded’, function() {
var in_use = (” != FWP.build_query_string());
$(‘.your-reset-btn’).toggleClass(‘hidden’, ! in_use);
});
})(jQuery);

</script>

<style>
/* add to your stylesheet */
.hidden { display: none; }
</style>
{{/gist}}