This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FruitTree(){ | |
this.height = 0; | |
this.age = 0; | |
this.fruitCollection = []; | |
this.dead = false; | |
} | |
function Fruit(){} | |
FruitTree.prototype.grow = function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Comment(author, text){ | |
this.form = "<form id='new_comment'><textarea></textarea><input name='author' id='authorName' type='text'><input type='submit' value='submit' id='submitButton'></form>"; | |
this.author = author; | |
this.text = text; | |
}; | |
Comment.prototype.addToPage = function() { | |
$('#comment_list').append("<li>" + this.text + "<span class='author'>" + this.author + "</span></li>"); | |
$('#new_comment').replaceWith('<button id="new_comment_button">New Comment</button>'); | |
}; |
OlderNewer