title: Fetch data from URL and Display with HTML
body: <p>I need some help with jQueury. I'm building a sidebar schedule which has a "Previous Day" and a "Next Day" button. What I want is if the user visits the website, it'll display the results for the current day (without clicking any buttons). But if the user clicks either "next" or "previous", it will show the results for the requested day.</p>
  
  <p>The data is fetched from the /home/schedule/ url. For example, if the url is: /home/schedule/20130331, it'll fetch schedule signups for March 31st.</p>
  
  <p>I have this code, however, it of course is not working. I'm not great with jQuery, so any help would be appreciated.</p>
  
  <pre><code>&lt;div class="btn-group" style="padding-bottom:3px;"&gt;
    &lt;a href="#" id="prev" class="btn"&gt;Previous Day&lt;/a&gt;
    &lt;a href="#" id="next" class="btn"&gt;Next Day&lt;/a&gt;                
  &lt;/div&gt;
  &lt;div id="displayResults" name="displayResults"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $("#next, #prev").click(function(e){
      e.preventDefault();
      $.ajax({
          url: '{{ URL::base() }}/home/schedule/' + date,
          data: date,
          type: 'GET',
          success: function (data) {
              $('#displayResults').html(data);
          }
      });
  });
  &lt;/script&gt;
  </code></pre>