Skip to content

Instantly share code, notes, and snippets.

@joshforbes
Last active August 29, 2015 14:21
Show Gist options
  • Save joshforbes/54416425ef7782080992 to your computer and use it in GitHub Desktop.
Save joshforbes/54416425ef7782080992 to your computer and use it in GitHub Desktop.
var s,
NewsWidget = {
settings: {
numArticles: 5,
articleList: $("#article-list"),
moreButton: $("#more-button")
},
init: function() {
s = this.settings;
this.bindUIActions();
},
bindUIActions: function() {
s.moreButton.on("click", function() {
NewsWidget.getMoreArticles(s.numArticles);
});
},
getMoreArticles: function(numToGet) {
// $.ajax or something
// using numToGet as param
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment