title: How to bind events on dynamic generated buttons in backbone?
body: <p>How do I bind click event on dynamic generated buttons in backbone.js?</p>
  
  <pre><code> window.PackageView = Backbone.View.extend({
  
      tagName: "div",
  
      className: "package-template",
  
      events:{
        'click #display-nodes'  :  'main', // This button is declared in my HTML code and calls main method successfully.
        'click .display'        :  'disp', // This is dynamic button generated with class as display
      },
  
      getAction: function(nodeId){ // Get Actions from NodeId and generate buttons
        $('.nodes').append("&lt;button&gt;" + action.Name + "&lt;/button&gt;"); //Generate Buttons
        $(".nodes button").addClass("display");
      },
  
      disp: function(){
          alert("Inside Disp Function");
      },
  </code></pre>
  
  <p>On clicking <code>#display-nodes</code> the nodes are displayed as required but <code>.display</code> is not working. How do I make this button call the function?</p>