tags:

views:

37

answers:

0

Hi, i am still playing around with jquery and what i want is to addClass active and opposite to the href item inside li. Any thoughts?

$(document).ready(function() {
            //Default Action
            $(".tab").hide();
            $(".menu li:first").addClass("active").show();
            $(".tab:first").show();

            //On Click Event
            $(".menu li").click(function() {
                $(".menu li").removeClass("active");
                $(this).addClass("active");
                $(".tab").hide();
                var activeTab = $(this).find("a").attr("href");
                $(activeTab).fadeIn();
                return false;
            });

        });