Agile Development Practices suggest developers keep a solutions log. I think we can all benefit from a combined solutions log. As I encounter errors or problems I intend to record the solutions on this blog. Please feel to leave your comments, solutions and email me with your errors and solutions.
Apr 4, 2013
Current most used JS pattern
var myObject = (function () {
// private variables
var ajaxUrl = '/path/to/ajax.html',
selectorObj,
// public variables
obj = {};
obj.publicVar = '';
// private methods
setupEventHandlers = function () {
};
// public methods
obj.init = function () {
setupEventHandlers();
};
return obj;
}());
$(function () {
myObject.init();
});
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment