Guest User

Untitled

a guest
Jul 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. NotesView = Backbone.View.extend({
  2. initialize: function() {
  3. this.render();
  4. },
  5. render: function() {
  6. var variables = { label: "hello" };
  7. var template = _.template( $('#template').html(), variables );
  8. this.el.html( template );
  9. },
  10. events: {
  11. "click input[type=button]": "doAlert"
  12. },
  13. doAlert: function (event) {
  14. alert("you clicked on me ??!!");
  15. }
  16. });
Add Comment
Please, Sign In to add comment