appu
appu

Reputation: 143

How to change tab background color when active

I want to change tab background color while click and active that tab..and font color also want change while clicking tab

My fiddlehttp://jsfiddle.net/fDk3z/4/

Please any one help!

Thanks for advance....

Upvotes: 1

Views: 1937

Answers (3)

Sunny
Sunny

Reputation: 432

You can use following javascript code for active tab color change.

<script>
    $(function() {
        $("li").click(function(e) {
            e.preventDefault();
            $("li").css("background-color","");
            $(this).css("background-color","yellow");
        });
    });
</script>

Upvotes: 0

Radonirina Maminiaina
Radonirina Maminiaina

Reputation: 7004

set background .selected1 to the color you want.

.tabrow li.selected1 {
    background-color: red;
}
.tabrow li.selected1 a {
    color: #fff;
}

Here a working demo

Upvotes: 1

vas
vas

Reputation: 960

Add this css

CSS

.hownav .tabrow li.selected1{background:#ccc}
.hownav .tabrow li.selected1 a{color:#fff}

Upvotes: 2

Related Questions