Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 20th, 2012  |  syntax: None  |  size: 0.74 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. :empty selector not working on column with anchors in some cells?
  2. <table>
  3.   <tr>
  4.     <td class="firstCol">Some text</td>
  5.     <td class="secondCol"><a href="##">A link!</a></td>
  6.   </tr>
  7.   <tr>
  8.     <td class="firstCol"></td>
  9.     <td class="secondCol"></td>
  10.   </tr>
  11. </table>
  12.        
  13. $('table tr').find('.firstCol:not(:empty)').parent().hide();
  14.        
  15. $('table tr').find('.secondCol:not(:empty)').parent().hide();
  16.        
  17. $('table tr').find('.firstCol:not(:empty)').parent().hide();
  18.        
  19. $('table tr').find('.secondCol:not(:empty)').parent().hide();
  20.        
  21. <td class="secondCol">
  22.    <CFIF firstColVal NEQ "">
  23.       <a href='##' value="#firstColVal#"></a>
  24.    </CFIF>
  25. </td>
  26.        
  27. <td class="secondCol"></td>
  28.        
  29. <td class="secondCol">
  30.                                       </td>