<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: :contains() Selector</title>
	<atom:link href="http://api.jquery.com/contains-selector/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/contains-selector/</link>
	<description>jQuery API Reference</description>
	<lastBuildDate>Fri, 19 Aug 2011 09:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sriraman Gopalan</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-8683</link>
		<dc:creator>Sriraman Gopalan</dc:creator>
		<pubDate>Fri, 28 Jan 2011 21:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-8683</guid>
		<description>Hello Everybody,&lt;br&gt;&lt;br&gt;I am stuck with an issue in IE 7. I have the following XML:&lt;br&gt;&lt;br&gt;&lt;x&gt;&lt;br&gt;&lt;aa&gt;&lt;br&gt;    &lt;bb&gt;111&lt;/bb&gt;&lt;br&gt;    &lt;cc&gt;222&lt;/cc&gt;&lt;br&gt;&lt;/aa&gt;&lt;br&gt;&lt;aa&gt;&lt;br&gt;    &lt;bb&gt;333&lt;/bb&gt;&lt;br&gt;    &lt;cc&gt;444&lt;/cc&gt;&lt;br&gt;&lt;/aa&gt;    &lt;br&gt;&lt;/x&gt;&lt;br&gt;&lt;br&gt;If I run a selector on this XML as follows:&lt;br&gt;$(&quot;aa&gt;bb:contains(&#039;333&#039;)+cc&quot;,$(&#039;x&#039;)).text()&lt;br&gt;Firefox returns 444 whereas in Internet Explorer 7, there is no response.&lt;br&gt;Can somebody please tell me what the issue is?&lt;br&gt;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Hello Everybody,</p>
<p>I am stuck with an issue in IE 7. I have the following XML:</p>
<p>&lt;x&gt;<br />&lt;aa&gt;<br />    &lt;bb&gt;111&lt;/bb&gt;<br />    &lt;cc&gt;222&lt;/cc&gt;<br />&lt;/aa&gt;<br />&lt;aa&gt;<br />    &lt;bb&gt;333&lt;/bb&gt;<br />    &lt;cc&gt;444&lt;/cc&gt;<br />&lt;/aa&gt;    <br />&lt;/x&gt;</p>
<p>If I run a selector on this XML as follows:<br />$(&#8220;aa&gt;bb:contains(&#39;333&#39;)+cc&#8221;,$(&#39;x&#39;)).text()<br />Firefox returns 444 whereas in Internet Explorer 7, there is no response.<br />Can somebody please tell me what the issue is?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Llarian</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-8339</link>
		<dc:creator>Llarian</dc:creator>
		<pubDate>Thu, 13 Jan 2011 22:19:44 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-8339</guid>
		<description>Using jQuery 1.4.2 (and tested with 1.4.4) , If I have:&lt;br&gt;&lt;br&gt;&lt;p&gt;condense_test.txt (FILE)&lt;/p&gt;&lt;br&gt;&lt;p&gt;SampleAggregateFile.txt (FILE)&lt;/p&gt;&lt;br&gt;&lt;p&gt;SampleDriver.txt (FILE)&lt;/p&gt;&lt;br&gt;&lt;br&gt;and in my $(document).ready() function, I have:&lt;br&gt;&lt;br&gt; $(&quot;p:contains(&#039;SampleAggregateFile.txt&#039;):contains(&#039;(FILE)&#039;)&quot;).css(&quot;background-color&quot;,&quot;red&quot;);&lt;br&gt;&lt;br&gt;  $(&quot;p:contains(&#039;SampleAggregateFile.txt (FILE)&#039;)&quot;).css(&quot;background-color&quot;,&quot;green&quot;);&lt;br&gt;&lt;br&gt;In IE8: I get green&lt;br&gt;In FF3.6, I get red&lt;br&gt;&lt;br&gt;It looks like there are already bug reports about this issue, but I thought I&#039;d comment here in case someone else has a similar issue.  I used the  the &quot;red&quot; version in my code since it works in both IE and FF.</description>
		<content:encoded><![CDATA[<p>Using jQuery 1.4.2 (and tested with 1.4.4) , If I have:</p>
<p>condense_test.txt (FILE)</p>
<p>
<p>SampleAggregateFile.txt (FILE)</p>
<p>
<p>SampleDriver.txt (FILE)</p>
<p>and in my $(document).ready() function, I have:</p>
<p> $(&#8220;p:contains(&#39;SampleAggregateFile.txt&#39;):contains(&#39;(FILE)&#39;)&#8221;).css(&#8220;background-color&#8221;,&#8221;red&#8221;);</p>
<p>  $(&#8220;p:contains(&#39;SampleAggregateFile.txt (FILE)&#39;)&#8221;).css(&#8220;background-color&#8221;,&#8221;green&#8221;);</p>
<p>In IE8: I get green<br />In FF3.6, I get red</p>
<p>It looks like there are already bug reports about this issue, but I thought I&#39;d comment here in case someone else has a similar issue.  I used the  the &#8220;red&#8221; version in my code since it works in both IE and FF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Medeiros</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-7968</link>
		<dc:creator>Alex Medeiros</dc:creator>
		<pubDate>Tue, 14 Dec 2010 17:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-7968</guid>
		<description>I fixed this problem using toString() method&lt;br&gt;&lt;br&gt;in javascript when you use &quot;text&quot; the js interpreted this creating a String object, then um cause all method of this object. One of this methods is toString which return a pure string.&lt;br&gt;&lt;br&gt;and there is other problem with this selector. You have to use &#039;  &#039;  to show the text which you want do search like this.&lt;br&gt;&lt;br&gt;with a pure string&lt;br&gt;$(&quot;p:contains(&#039;John&#039;) &quot;)&lt;br&gt;&lt;br&gt;so when you use a variable you have to continues using this &#039; &#039;&lt;br&gt;$(&quot;p:contains(&#039;&quot; + name + &quot;&#039;) &quot;)&lt;br&gt;&lt;br&gt;to close try this:&lt;br&gt;$(&quot;div:contains(&#039;&quot; + name.toString() + &quot;&#039; )&quot;).css(&quot;text-decoration&quot;, &quot;underline&quot;);</description>
		<content:encoded><![CDATA[<p>I fixed this problem using toString() method</p>
<p>in javascript when you use &#8220;text&#8221; the js interpreted this creating a String object, then um cause all method of this object. One of this methods is toString which return a pure string.</p>
<p>and there is other problem with this selector. You have to use &#39;  &#39;  to show the text which you want do search like this.</p>
<p>with a pure string<br />$(&#8220;p:contains(&#39;John&#39;) &#8220;)</p>
<p>so when you use a variable you have to continues using this &#39; &#39;<br />$(&#8220;p:contains(&#39;&#8221; + name + &#8220;&#39;) &#8220;)</p>
<p>to close try this:<br />$(&#8220;div:contains(&#39;&#8221; + name.toString() + &#8220;&#39; )&#8221;).css(&#8220;text-decoration&#8221;, &#8220;underline&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Medeiros</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-7564</link>
		<dc:creator>Alex Medeiros</dc:creator>
		<pubDate>Tue, 14 Dec 2010 09:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-7564</guid>
		<description>I fixed this problem using toString() method&lt;br&gt;&lt;br&gt;in javascript when you use &quot;text&quot; the js interpreted this creating a String object, then um cause all method of this object. One of this methods is toString which return a pure string.&lt;br&gt;&lt;br&gt;and there is other problem with this selector. You have to use &#039;  &#039;  to show the text which you want do search like this.&lt;br&gt;&lt;br&gt;with a pure string&lt;br&gt;$(&quot;p:contains(&#039;John&#039;) &quot;)&lt;br&gt;&lt;br&gt;so when you use a variable you have to continues using this &#039; &#039;&lt;br&gt;$(&quot;p:contains(&#039;&quot; + name + &quot;&#039;) &quot;)&lt;br&gt;&lt;br&gt;to close try this:&lt;br&gt;$(&quot;div:contains(&#039;&quot; + name.toString() + &quot;&#039; )&quot;).css(&quot;text-decoration&quot;, &quot;underline&quot;);</description>
		<content:encoded><![CDATA[<p>I fixed this problem using toString() method</p>
<p>in javascript when you use &#8220;text&#8221; the js interpreted this creating a String object, then um cause all method of this object. One of this methods is toString which return a pure string.</p>
<p>and there is other problem with this selector. You have to use &#39;  &#39;  to show the text which you want do search like this.</p>
<p>with a pure string<br />$(&#8220;p:contains(&#39;John&#39;) &#8220;)</p>
<p>so when you use a variable you have to continues using this &#39; &#39;<br />$(&#8220;p:contains(&#39;&#8221; + name + &#8220;&#39;) &#8220;)</p>
<p>to close try this:<br />$(&#8220;div:contains(&#39;&#8221; + name.toString() + &#8220;&#39; )&#8221;).css(&#8220;text-decoration&#8221;, &#8220;underline&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6707</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sun, 31 Oct 2010 02:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6707</guid>
		<description>thanks very much for the advice&lt;br&gt;i try to replace the like of&lt;br&gt;//$(&#039;&lt;a href=&quot;http://span.name&quot; rel=&quot;nofollow&quot;&gt;span.name&lt;/a&gt; a:contains(&quot;291b&quot;),&lt;a href=&quot;http://span.name&quot; rel=&quot;nofollow&quot;&gt;span.name&lt;/a&gt; a:contains(&quot;titita&quot;)&#039;).css(&quot;border&quot;, &quot;2px blue solid&quot;);&lt;br&gt;with&lt;br&gt;var test =  function(index)&lt;br&gt;{&lt;br&gt;	var name = [&#039;291b&#039;,&#039;titita&#039;]&lt;br&gt;	var item = $( this );&lt;br&gt;	GM_log(item.text);&lt;br&gt;	for(i=0;i&lt;name.length;++i)&lt;br&gt;	{&lt;br&gt;		if(name[i]==item.text)&lt;br&gt;			return true;&lt;br&gt;	}&lt;br&gt;	return false;&lt;br&gt;}&lt;br&gt;$(&#039;&lt;a href=&quot;http://span.name&quot; rel=&quot;nofollow&quot;&gt;span.name&lt;/a&gt; a&#039;).filter(test).css(&quot;border&quot;, &quot;2px blue solid&quot;);&lt;br&gt;but no success, i guess I got the syntax wrong, but not sure what&#039;s the right&lt;/name.length;++i)&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>thanks very much for the advice<br />i try to replace the like of<br />//$(&#39;<a href="http://span.name" rel="nofollow">span.name</a> a:contains(&#8220;291b&#8221;),<a href="http://span.name" rel="nofollow">span.name</a> a:contains(&#8220;titita&#8221;)&#39;).css(&#8220;border&#8221;, &#8220;2px blue solid&#8221;);<br />with<br />var test =  function(index)<br />{<br />	var name = [&#39;291b&#39;,&#39;titita&#39;]<br />	var item = $( this );<br />	GM_log(item.text);<br />	for(i=0;i&lt;name.length;++i)&lt;br&gt;	{<br />		if(name[i]==item.text)<br />			return true;<br />	}<br />	return false;<br />}<br />$(&#39;<a href="http://span.name" rel="nofollow">span.name</a> a&#39;).filter(test).css(&#8220;border&#8221;, &#8220;2px blue solid&#8221;);<br />but no success, i guess I got the syntax wrong, but not sure what&#39;s the right&lt;/name.length;++i)&lt;br&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Haren</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6703</link>
		<dc:creator>Michael Haren</dc:creator>
		<pubDate>Sun, 31 Oct 2010 00:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6703</guid>
		<description>Tom,&lt;br&gt;&lt;br&gt;To do something like that I would use the .filter() method with a function passed in. In your function you could have a little javascript to do something like that. If your array Is very big, though, you might want to think about something completely different for performance reasons</description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>To do something like that I would use the .filter() method with a function passed in. In your function you could have a little javascript to do something like that. If your array Is very big, though, you might want to think about something completely different for performance reasons</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6702</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sun, 31 Oct 2010 00:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6702</guid>
		<description>what if this is a long array ? is there any way to type :contain(array[0])::contain(array[1])...:contain(array[n-1]) ?&lt;br&gt;thx!</description>
		<content:encoded><![CDATA[<p>what if this is a long array ? is there any way to type :contain(array[0])::contain(array[1])&#8230;:contain(array[n-1]) ?<br />thx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6502</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 21 Oct 2010 12:15:06 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6502</guid>
		<description>Woops... change != to ==... 
&lt;br&gt;if ($(&#039;#dropdownbox&#039;).get(0).selectedIndex == 0) { do something; } 
&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Woops&#8230; change != to ==&#8230;<br />
<br />if ($(&#39;#dropdownbox&#39;).get(0).selectedIndex == 0) { do something; }<br /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6501</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 21 Oct 2010 12:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6501</guid>
		<description>if ($(&#039;#dropdownbox&#039;).get(0).selectedIndex != 0) { do something; }</description>
		<content:encoded><![CDATA[<p>if ($(&#39;#dropdownbox&#39;).get(0).selectedIndex != 0) { do something; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viishaal</title>
		<link>http://api.jquery.com/contains-selector/comment-page-1/#comment-6454</link>
		<dc:creator>Viishaal</dc:creator>
		<pubDate>Wed, 20 Oct 2010 01:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=566#comment-6454</guid>
		<description>If I remove the . in 99.8632 then it works fine :-/</description>
		<content:encoded><![CDATA[<p>If I remove the . in 99.8632 then it works fine :-/</p>
]]></content:encoded>
	</item>
</channel>
</rss>

