Skip to content

Instantly share code, notes, and snippets.

@ElemarJR
Created November 2, 2012 16:29
Show Gist options
  • Select an option

  • Save ElemarJR/4002457 to your computer and use it in GitHub Desktop.

Select an option

Save ElemarJR/4002457 to your computer and use it in GitHub Desktop.
(function (){
var root = this;
define('jquery', [], function () { return root.$; });
define('toastr', [], function () { return root.toastr; });
$('#incrementButton').click(function() {
require(['js/app/counter'], function(c) {
c.increment();
});
});
$('#decrementButton').click(function() {
require(['js/app/counter'], function(c) {
c.decrement();
});
});
$('#resetButton').click(function() {
require(['js/app/counter'], function(c) {
c.reset();
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment