title: How does this jQuery code work(i.e what would be put into the variables)?
body: <p>I'm studying this jQuery code that takes the web-page generated by SSRS Report Viewer, and then overlays it with a datepicker( standard jQuery ). </p>
  
  <p>here , we look for the input text box that takes in a date:</p>
  
  <pre><code>var span = innerTable.find("span:contains('Date')");
  if (span) {
      var innerRow = $(span).parent().parent();
      var innerCell =  innerRow.find("td").eq(1);
      var textFrom = innerCell.find("input[type=text]");
      innerCell = innerRow.find("td").eq(4);
      var textTo = innerCell.find("input[type=text]"); 
  }
  </code></pre>
  
  <p>so I'm curious about what kind of value goes into the variable <code>textTo</code> . That's because later in the code, we say:</p>
  
  <pre><code>$(textTo).focus(function () {
      $(textTo).datepicker("show");   
  });
  </code></pre>
  
  <p>Also, what does <code>focus(function ()</code> do ?</p>
  
  <p>any tips appreciated, thanks!</p>