var $ = jQuery.noConflict();
// remap jQuery to $
(function($){
})(window.jQuery);
// remap jQuery to $ AND wait till doc loaded
jQuery(document).ready(function($){
});
function My_Class() {
// private properties
var privateProp = 'private property';
this.post_id = 0;
this.post_type = '';
this.baseUrl = '/';
// public properties
this.publicProp = 'public property';
// privileged methods
this.privilegedFunc = function(){ alert('privileged method'); }
// private methods
function privateFunc(){ alert('private method'); }
this.showPost = function() {
};
};
// public prototype properties
My_Class.prototype.prototypeProp = 'prototype property';
// static properties
My_Class.staticProp = 'static property';
// public method
My_Class.prototype.publicFunc = function() {
alert('public method');
}
My_Class.prototype.init = function() {
if(this.post_id > 0)
{
this.showPost();
}
}
comments
No comments yet.
Sorry, the comment form is closed at this time.