[Resolved] Uncaught reference error

Home Forums Support Uncaught reference error

  • This topic has 2 replies, 2 voices, and was last updated 3 months ago by Leo.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1338067
    fabien

    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>

    #1338071
    fabien

    Sorry ignore my request 🙂 This was caused by another plugin whose hide/show function uses the same js reference.

    #1338149
    Leo
    Staff
    Customer Support

    Glad you’ve figured out 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.