title: How to pass on variables to a modal dialog using jquery?
body: <p>I'm creating a calendar dynamically in rails and I want to open a modal dialog showing the day the user clicked (So I can use a form in there to make a reservation on that specific day).
  How can I do that? Here's my code:
  BTW, I'm using SIMPLE MODAL (http://www.ericmmartin.com/projects/simplemodal-demos/)</p>
  
  <p>View: (I shorted it)</p>
  
  <pre><code>&lt;table&gt;
   &lt;tr&gt;
    &lt;td&gt;Monday&lt;/td&gt;
    &lt;td&gt;Tuesday&lt;/td&gt;
    ...
   &lt;/tr&gt;
   &lt;tr&gt;
      &lt;% for i in (0..6)    #Weekdays %&gt;
             &lt;td&gt;&lt;a href='#' class='basic'&gt;&lt;%= @date.day %&gt;&lt;/a&gt;&lt;/td&gt;&lt;/table&gt;
      &lt;% end %&gt;
   &lt;tr/&gt;
  &lt;/table&gt;
  
  &lt;div id="basic-modal-content"&gt;
       &lt;!-- Here's the hidden form that will make the reservation. 
            This is the modal dialog content!. Here is where I need to show the day clicked--&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The Javascript code: (I just open it)</p>
  
  <pre><code>$('.basic').click(function (e) {
      $('#basic-modal-content').modal();
      return false;
  });
  </code></pre>
  
  <p>Thanks a lot! I hope any of you could help me.</p>
  
  <p>Gus</p>