window.app = {};
(function(app) {
app.log = function(data) {
console.log(data);
};
}(app));
app.log("data");
jQuery is slightly different from it fn: since you use the syntax $('selector')to find elements that need to be processed, jQuery returns a spetial wrapper containing all-like fn.funcdefinitions that you made in addition to the built-in functions.
, - , . :
window.app = function(p) {
var wrapper = {
};
if (app.fn) {
}
return wrapper;
};
, ?
, , , app , .