Created
September 7, 2017 18:58
-
-
Save mgibbs189/555f9649ac29fa155c1bf242e6d2a8c6 to your computer and use it in GitHub Desktop.
Hide template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, add some CSS to your theme: | |
.facetwp-template { display: none; } | |
.facetwp-template.visible { display: block; } | |
Then you can use this JS to dynamically add the CSS class after the first refresh: | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
if (FWP.loaded) { | |
$('.facetwp-template').addClass('visible'); | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment