Created
June 27, 2013 20:59
-
-
Save rafaelrinaldi/5880355 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var p = Home.prototype = createObject(Section.prototype); | |
function Home( id ) { | |
Section.apply(this, arguments); | |
}; | |
p.init = function( root ) { | |
console.log('@home init'); | |
Section.prototype.init.call(this, arguments); | |
}; |
This file contains hidden or 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
/** | |
* Section object. | |
* @param {String} id Section ID. | |
*/ | |
function Section( id ) { | |
console.log('[Section] :: constructor :: Creating section "' + this.id + '"'); | |
// Section ID. | |
this.id = id; | |
// Content selector. | |
this.selector = '#section-wrapper section#'.concat(this.id); | |
} | |
/** | |
* Initializes a Section object. | |
* @param {Object} main Main DOM element. | |
*/ | |
p.init = function( root, markup ) { | |
console.log('@section init'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment