title: jquery hover show message if table row date is less than today
body: <p>I need to show a message called expired near the title of each row if the end date is less than todays date. This is going to be done using hover in jquery.</p>
  
  <p>My table view is below:</p>
  
  <pre><code>                     &lt;div class="table-responsive"&gt;
                          &lt;table class="table"&gt;
                            &lt;thead&gt;
                              &lt;tr&gt;
                                &lt;th scope="col"&gt;Title&lt;/th&gt;
                                &lt;th scope="col"&gt;Start Date&lt;/th&gt;
                                &lt;th scope="col"&gt;End Date&lt;/th&gt;
                                &lt;th scope="col"&gt;Description&lt;/th&gt;
                                &lt;th scope="col"&gt;Edit&lt;/th&gt;
                              &lt;/tr&gt;
                            &lt;/thead&gt;
                            &lt;tbody&gt;
                              &lt;?php foreach($offerList as $info){ ?&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;&lt;a href="&lt;?php echo base_url()."offer/publicview/?id=".urlencode($this-&gt;encrypt-&gt;encode($info-&gt;offid)); ?&gt;"&gt;&lt;?php echo $info-&gt;title; ?&gt;&lt;/a&gt;&lt;/td&gt;
                                  &lt;td&gt;&lt;?php echo $info-&gt;startdate; ?&gt;&lt;/td&gt;
                                  &lt;td&gt;&lt;?php echo $info-&gt;enddate; ?&gt;&lt;/td&gt;
                                  &lt;td&gt;&lt;?php echo $info-&gt;discrip; ?&gt;&lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;a href="&lt;?php echo base_url()."offer/edit/?id=".urlencode($this-&gt;encrypt-&gt;encode($info-&gt;offid)); ?&gt;"&gt;Edit&lt;/a&gt;                    
  
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;?php } ?&gt;
                            &lt;/tbody&gt;
                          &lt;/table&gt;
                          &lt;/div&gt;
  </code></pre>
  
  <p><strong>jquery :</strong></p>
  
  <pre><code>&lt;script&gt;
  
  
  var today = t.getDate() + '/' + (t.getMonth()+1) + '/' + t.getFullYear() ;
  
  $( "tr" ).hover(
  
    function() {  
     $( this ).append( $( "&lt;span&gt; expired &lt;/span&gt;" ) );    
    }, function() {
     $( this ).find( "span:last" ).remove();
    });
  
   $( "tr.fade" ).hover(function() {
    $( this ).fadeOut( 100 );
    $( this ).fadeIn( 500 );
   });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I need to get the end date of each row and compare it with todays date. And if the end date is less than todays date then the message should be shown near the title.</p>
  
  <p>Any idea on doing this? I have no idea on how to get the end date of each row.</p>