Quotes help make search much faster. Example: "Practice Makes Perfect"

Tuesday, December 18, 2012

Codecademy Sample Solution: Codeyear Oh You Fancy Huh



// sample solution to script.js

$(document).ready(function() {
    $(".content").fadeOut('slow', function(){
        $("ul.tabs li").click(function(){
            if($(this).attr('class')!=='selected'){          
                $("ul.tabs li").removeClass('selected');
                $(this).addClass('selected');
               
                var selectionId2 = $(this).attr('id');
                $(".page").css('display','none');
                $(".page#"+selectionId2+"").css('display','block');
                $(".content").fadeIn('slow');
            }
        });
    });
});

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts