title: I want to create a button along my prepend list item
body: <p>I recently started JQuery and I need to create a list using the datepicker JQuery function. The problem starts with my prepend because I have to prepend the date I get from the datepicker, the event AND a new button to ERASE whatever's in that line (so the button must be prepended along the list item). I'm having some trouble with this part.</p>
  
  <p>This is the code I have:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
       &lt;head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;title&gt;jQuery UI Datepicker - Display month &amp;amp; year menus&lt;/title&gt;
        &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"&gt;
        &lt;script src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
        &lt;script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
  
        &lt;link rel="stylesheet" href="css.css"&gt;
  
        &lt;script&gt;
        $(function() {
          $( "#datepicker" ).datepicker({
            changeMonth: true,
            changeYear: true
          });
        });
  
        $(document).on('click', '#bta', '#apagar', function () {
  
          if ($('#datepicker').val() != '' &amp;&amp; $('#evento').val() != '' ) {
              $('#caixa').prepend('&lt;p&gt;' + $('#datepicker').val() + $('#evento').val() + $('&lt;input type="button" id="apagar" value="apagar" /&gt;') + '&lt;/p&gt;');
              $('input').val('');
          }
  
      });
  
        &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div id="box"&gt;
              Lista de Tarefas:
              &lt;br&gt;&lt;br&gt;
              Date: &lt;input type="text" id="datepicker"&gt; &amp;nbsp; &amp;nbsp;
  
              Event: &lt;input type="text" id="evento"&gt;    &lt;button id="bta" class="bta"&gt;+&lt;/button&gt;
  
              &lt;div id="caixa"&gt;  &lt;/div&gt;
              &lt;/body&gt;
          &lt;/div&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm pretty sure this is probably very simple but I've only now started looking around and everything I try to search is either overly complex or doesn't resolve my issue... of course my inability to implement the solutions I find might be very well a problem too.</p>
  
  <p><a href="http://i.imgur.com/spx1QRj.png" rel="nofollow">This is to help visualize my problem</a></p>