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

Tuesday, December 18, 2012

Codecademy Sample Solution: Codeyear The Data Model



// sample solution to script.js

$(document).ready(function() {
    var $newDiv = $("body").append("<div class='post'></div>");
    $newDiv.append("<div class='header'>New Header</div>");
    $newDiv.append("<div class='content'>New Content</div>");
   
    $("div.header").click(function(e){
        $(this).siblings(".content").animate({
            //opacity: 0.25,
            //left: '+=50',
            height: 'toggle'
        }, 250, function() {
            // Animation complete.
        });  
    });
});

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts