Support

Account

Home Forums Front-end Issues .acf-tab-wrap won't work for .click() in jQuery

Helping

.acf-tab-wrap won't work for .click() in jQuery

  • I’m trying to use a tab button to trigger a click event, but it won’t work with anything inside the .acf-tab-wrap container.

    This is my code:
    `jQuery(document).ready(function( $ ){
    // Frontend Display Tabs
    $(“.acf-tab-wrap”).click( function() {
    // Set Active Tab Button
    $(“#tab-rules”).addClass(“active”);
    } );
    });

    If I swap “.acf-tab-wrap” for its parent container, “.inside”, it works fine. It’s only when I use “.acf-tab-wrap” or any of ul, li, or a child elements that it just doesn’t work.

  • have you tried using class for the actual <a> element?
    $('.acf-tab-button')

    not sure about this $(“#tab-rules”).addClass(“active”); since I can’t find that ID anywhere in the ACF code.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.