Support » Plugin: Widgets In Tabs » Feature Request Classes Needed on Titles

  • Resolved saracup

    (@saracup)


    This is a wonderful plugin and thank you! I have one feature request. You have added class numbers to the widget areas, e.g.:

    .wit-tab-container li.widget-1

    but the titles for each widget area are either “selected” or a default. I’d like to color each tab differently, so having a corresponding class number for the titles, e.g. :

    .wit-tab-title.1

    would allow for customization more easily. Thank you again for a great plugin!

    -Cathy

    https://wordpress.org/plugins/widgets-in-tabs/

Viewing 1 replies (of 1 total)
  • Plugin Author 404

    (@ahspw)

    Hi Cathy,

    I’m glad you like WIT, enjoy it.

    WIT is designed to blend in your blog’s theme, and that’s why there is no styling options.

    Anyways, I’ll help you achieve what you want.

    Edit WIT’s JavaScript file, or add the following code to your theme but make sure it comes after WIT:

    var titlesParents = jQuery('.wit-title');
    titlesParents.each(function(){
        var titles = jQuery(this).find('.wit-tab-title');
        for(var i = 0; i < titles.length; i++) {
            jQuery(titles[i]).addClass("wit-tab-title-" + i);
        }
    });

    The previous code will add numbered classes to widgets titles like this: wit-tab-title-0, wit-tab-title-1.
    Now you can style each tab title differently as you wish.

    Good luck.

Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request Classes Needed on Titles’ is closed to new replies.