Filter Tab - Background Color

Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

Screenshot for “Filter Tab - Background Color”

To customize the design of your component to match the filter tabs, first, you will need to make sure a filter tab is set up with a color selected.

Screenshot for “Filter Tab - Background Color”

Once you have selected a color for the filter tab, you will navigate to your page's JavaScript tab.

Screenshot for “Filter Tab - Background Color”

Within the tab, copy and paste the code found here:

Text
TB.render('any', function(data) {
    component = data.objId;
    cp = '[data-obj-id="' + component.replace('component_', '') + '"]';

    function bgcolor(elm) {
        $(cp).find(".table-actions").css({
            "background-color": $(elm).css("background-color"),
            "border-color": $(elm).css("border-color")
        })
    }
    if ($(cp + ' .filter-tabs > .nav.nav-tabs > li.active').length) {
        bgcolor($(cp + ' .filter-tabs > .nav.nav-tabs > li.active > a').first())
    }
    jQuery('body').on('click', cp + ' .filter-tabs > .nav.nav-tabs > li > a', function() {
        bgcolor(this);
    });
});

Was this page helpful?

Something wrong or missing on this page? Tell us.