Skip to content

Instantly share code, notes, and snippets.

@irfan
Created May 20, 2013 11:18
Show Gist options
  • Save irfan/5611681 to your computer and use it in GitHub Desktop.
Save irfan/5611681 to your computer and use it in GitHub Desktop.
/*
* @Description:
*
*/
(function(global, $){
// namespace on global scope
global.company = global.company || {},
global.company.post = global.company.post || {};
// dependencies;
var Delete = global.company.post.Delete,
Like = global.company.post.Like;
// constructor
global.company.post.Comment = function(comment, parent) {
this.id = comment.id;
this.parent = parent;
}
//prototype
global.company.post.Comment.prototype = {
remove: function(){
this.parent.removeComment(this.id);
}
}
}(this, jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment