Hi there,
I believe a recent update of GP Premium created a glitch on my home page. A button ‘Yes Please’ is meant to reveal hidden tabs with the following javascript elements but I am now getting an error. I thought it may be Autoptimize or Cloudflare Rocket Loader but after deactivating these two, it still isn’t working.
When I remove the elements, the error disappears, but the buttons still aren’t working…
<script>
(function() {
jQuery('.toggle-button .fl-button').on('click', function(e){
if ( jQuery('.toggle-section').is(':hidden') ) {
jQuery('.toggle-section').css('display', 'block');
} else {
jQuery('.toggle-section').css('display', 'none');
}
});
})(jQuery);
</script>
and
<script>
jQuery(document).ready(function($) {
$(“.toggle-button a”).on(“click”,function(e){
// Reset all columns visibility
$(“[class*=’toggle-section-‘]”).hide();
// Get target from clicked button attribute
var target = $(this).closest(“.toggle-button”).attr(‘target’);
// Toggle target visibility
$(‘.’ + target).fadeToggle();
// Disable links
e.preventDefault();
});
});
</script>