FacetWP – disable model until make is selected

mgibbs189

{{gist file=”test.js” lang=”javascript”}}
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (0 < FWP.facets[‘marke’].length) {
$(‘.facetwp-facet-modell select’).removeAttr(‘disabled’);
}
else {
$(‘.facetwp-facet-modell select’).attr(‘disabled’, ‘disabled’);
}
});
})(jQuery);
</script>
{{/gist}}