[jQuery] Qucik ?: Checking if element exists in a jQ object?
Is there a quick way to check if an element exists in a jQ object stack?
It seems that .find(), .filter(), .is() all take CSS selectors (strings)?
Here's an example of what I'm trying to do;
aaa
bbb
<p class="noinc">ccc
ddd
<script type="text/javascript">
$().ready(function() {
var row = $('p');
var fRow = $(row);
fRow.not('.noinc');
row.each(function(i) {
if ($(fRow).filter(this).size() > 0)
// element is in fRow , do Something!
else
// element is NOT in fRow, do Something else!
});
});
</script>
~ Brice
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/