title: How to call javascript function with parameter in jquery event handler?
body: <p>I am stuck. Searched and tried for hours.</p>
  
  <p>EDIT:
  I still can't make it work. Okay, I'll just put the source code to make it clear what I want to accomplish.</p>
  
  <pre><code>    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      var date_fmt="yyyy-mm-dd";
      var time_fmt="HH:MM";
      var date_field="#id_start_0, #id_end_0"; //id refering to html input type='text'
      var time_field="#id_start_1, #id_end_1"; //id refereing to html input type='text'
  
  
      function clearFmt(fmt_type)
      { 
          if($(this).val() == fmt_type) {
              $(this).val("");
  
          }
      }
  
      function putFmt(fmt_type)
      {
          if($(this).val() == "") {
              $(this).val(fmt_type);
          }
      }
  
  
  $(document).ready(function() {
  
      $(date_field).attr("title",date_fmt);
      $(time_field).attr("title",time_fmt);
  
      $(date_field).click(function() {
          clearFmt(date_fmt);
      });   
  
      $(date_field).blur(function(){
          putFmt(date_fmt);
      });
  
      $(time_field).click(function(){
          clearFmt(time_fmt);
      });   
  
      $(time_field).blur(function(){
          putFmt(time_fmt);
      });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Help ?</p>