title: creating dynamic button and events in jquery
body: <p>how to create a dynamic button with respect to XML data.Here i have to convert the name (XYZ) to a button and making an event to each dynamic button.Now am getting xyz,50 but i want to change it as button with name xyz,and also events.</p>
  
  <pre><code>&lt;class_members&gt;
   &lt;student&gt;
     &lt;name&gt;XYZ&lt;/name&gt;
     &lt;marks&gt;50&lt;/marks&gt;
   &lt;/student&gt;
   &lt;student&gt;
    &lt;name&gt;ABC&lt;/name&gt;
    &lt;marks&gt;25&lt;/marks&gt;
    &lt;/student&gt;
    &lt;/class_members&gt;
  </code></pre>
  
  <p>jquery code is here.</p>
  
  <pre><code> &lt;script&gt;
         $(document).ready(function () {
        $("#Submit").click(function () {
              $.ajax({
                 type: "GET",
                        url: "marks.xml",
                          dataType: "xml",
                           success: function (xml) {
                                  $(xml).find('student').each(function () {
                                     var Name = $(this).find('name').text();
                                      var Mark = $(this).find('marks').text();
                                      $("#content").append('&lt;li&gt;' + Name + " ," + Mark + '&lt;li&gt;');
                               });
  
                             }
                          });
                      });
                  });
               &lt;/script&gt;
          &lt;/head&gt;
          &lt;body&gt;
              &lt;form id="From1" method="post"&gt;
              &lt;input type="button" value="submit" name="Submit" id="Submit" /&gt;
              &lt;div id="content"&gt;
              &lt;/div&gt;
              &lt;/form&gt;
  </code></pre>