Skip to content

Instantly share code, notes, and snippets.

@rafaelrinaldi
Created June 27, 2013 20:59
Show Gist options
  • Save rafaelrinaldi/5880355 to your computer and use it in GitHub Desktop.
Save rafaelrinaldi/5880355 to your computer and use it in GitHub Desktop.
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);
};
/**
* 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