facetwp check FWP in js

djrmom

{{gist file=”scripts.js” lang=”javascript”}}
<script>
(function($) {
$(function() {
if ( ‘undefined’ !== typeof FWP ) {
// Make checkbox options semi-transparent
FWP.loading_handler = function(params) {
params.element.find(‘.facetwp-checkbox’).css(‘opacity’, 0.5);
}
}
});
})(jQuery);
</script>
{{/gist}}