2

I have two scenarios I am trying to capture.

1) I want to use jquery to filter out all elements inside the jquery object who has a child with classname = myclass

2) I want to use jquery to filter out all elements inside the jquery object who's child element's innerhtml == ""

I was trying something like this

var Rows = allRows.filter(children(".myclass"));

and this wasn't working (and tried out a few other things as well, just dont have the code anymore.

user1015214
  • 2,733
  • 10
  • 36
  • 66

1 Answers1

5

Use the has method:

var Rows = allRows.has('.myclass');

Here's the fiddle: http://jsfiddle.net/j8WUZ/2/

Joseph Silber
  • 214,931
  • 59
  • 362
  • 292
  • but it seems to work! thanks! Also, thanks for the !!, I had never seen it before but I found what it was here http://stackoverflow.com/questions/784929/what-is-the-not-not-operator-in-javascript – user1015214 Sep 13 '13 at 14:38