Created
August 8, 2014 06:26
-
-
Save jaywon/606e946fcd1d7850484b to your computer and use it in GitHub Desktop.
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
//Main Class | |
//Create base div class | |
function Div(){ | |
this.color = null; | |
this.htmlElement = null; | |
this.draw = function (){ | |
this.htmlElement = $("<div>"+this.color+"</div>"); | |
$('body').append(newDiv); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, so the way this works is that instead of creating a newDiv var you instead want to create an attribute of the Div class, which is the this.htmlElement, and then I can use that attribute in other sub classes of Div?