Support

Account

Home Forums Feature Requests Add CSS class to tabs Reply To: Add CSS class to tabs

  • I think that field_key-field_554c7be3c5fb7 is the reference to the original field that’s being copied to the other languages, maybe even though you have German set as the default language there is another version of the field group that ACF is copying all the language field groups from. I could be wrong, but that’s what’s repeated in both tabs and my gut feeling is that’s the reason.

    I’m just trying to figure out how to work with what’s already there. I like puzzles.

    You can get this element, then get the data-key attribute from it and then you have what you need.

    
    var tab_div = $('.field_key-field_554c7be3c5fb7');
    var data_key = tab_div.getAttribute('data-key');
    $('a[data-key="'+data_key+'"]').doSomething();
    

    Or maybe you don’t even need to go that far, maybe using that class is enough to target what you need to.