Forked from mgibbs189/gist:555f9649ac29fa155c1bf242e6d2a8c6
Created
July 24, 2019 00:22
-
-
Save pije76/7c76665b2dd325465d7f7cc291112741 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