I have read several things about this, and I came to this conclusion, example:
var classe = function () {
var metodo = function () {
return 0;
}
return {
init: function () {
metodo();
}
};
}();
jQuery(document).ready(function () {
classe.init();
});
First:
Is this the correct way to instantiate classes / methods in javascript? If not, how would the correct form be?
Second:
jQuery methods are called in a cadenced form:
$('#elemento').show().html('<html></html>').append('<div></div>').addClass('exemplo');
Does jQuery natively (without doing functions, just the original methods) can be considered an object orientation?