title: jQuery with multiple criteria
body: <p>I have a table with multiple columns but some of them are hidden using display:none. In case, it helps, I'm using Footable to hide the entire column.
  Cells can only have the letter P, otherwise they are empty. My problem is that on the last column I'm counting how many "P"s are on the row and I'm using this code:</p>
  
  <pre><code>$('td.last_column').html(function() {
  var P = $(this).prevAll('td.column_p:contains(P)').length;
  return P;
  });
  </code></pre>
  
  <p>The problem is that it is also counting the cells that contains "P" but are hidden. Is there any easy way to get only the number of VISIBLE cells on the row that contain the letter P?</p>
  
  <p>Thanks in advance!</p>