JQuery's Contains returns an Object?
Posted
by Abs
on Stack Overflow
See other posts from Stack Overflow
or by Abs
Published on 2010-04-28T17:02:34Z
Indexed on
2010/04/28
17:13 UTC
Read the original article
Hit count: 245
jQuery
|JavaScript
Hello all,
I am trying to see if a particular string appears in a div. I have tried but it doesn't return true or false which is what I thought contains did?
if($("#path"+i+"_status:contains('!=')")){
alert($("#path"+i+"_status:contains('!=')"));
//alerts - [object object]
return true;
}
Here is my HTML:
<div class="status" id="path3_status">
<img height="21" align="absmiddle" src="images/valid.jpg">Text File (3000) = Source Table (3000)<img height="21" align="top" src="images/info.jpg" " id="img_path3">
<a onclick="clear_file('TI004OBAE', 'path3');" href="#">Clear</a>
</div>
What am I doing wrong. How can I find out if a div contains the string "!="?
Thanks all for any help
© Stack Overflow or respective owner