Created
February 26, 2013 22:44
-
-
Save j0lvera/5043056 to your computer and use it in GitHub Desktop.
JS pattern by Chris Coyier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s, | |
app = { | |
settings: { | |
numArticles: 5, | |
articleList: $("#article-list"), | |
moreButton: $("#more-button") | |
}, | |
init: function() { | |
s = this.settings; | |
this.bindUIActions(); | |
}, | |
bindUIActions: function() { | |
s.moreButton.on("click", function() { | |
app.getMoreArticles(s.numArticles); | |
}); | |
}, | |
getMoreArticles: function(numToGet) { | |
// $.ajax or something | |
// using numToGet as param | |
} | |
}; | |
app.init(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment