<?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: Extending jQuery&#8217;s selector capabilities</title>
	<atom:link href="http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 08 Mar 2010 01:21:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ChiangMai Guide And Tour</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-23419</link>
		<dc:creator>ChiangMai Guide And Tour</dc:creator>
		<pubDate>Sun, 01 Nov 2009 01:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-23419</guid>
		<description>Nice.., good information for selector extends</description>
		<content:encoded><![CDATA[<p>Nice.., good information for selector extends</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trygve Andersen</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-19672</link>
		<dc:creator>Trygve Andersen</dc:creator>
		<pubDate>Thu, 03 Sep 2009 21:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-19672</guid>
		<description>Should this work in IE7?

$(&#039;div.someClass:width(&gt;500)&#039;).remove();

I&#039;ve noticed that IE7 appears to ignore the class selector and iterates though every DIV checking the width.  Chrome &amp; FF work fine. I fixed it by doing this...

$(&#039;div.someClass&#039;).filter(&#039;:width(&gt;500)&#039;).remove();

Did I do something wrong?</description>
		<content:encoded><![CDATA[<p>Should this work in IE7?</p>
<p>$(&#8216;div.someClass:width(&gt;500)&#8217;).remove();</p>
<p>I&#8217;ve noticed that IE7 appears to ignore the class selector and iterates though every DIV checking the width.  Chrome &amp; FF work fine. I fixed it by doing this&#8230;</p>
<p>$(&#8216;div.someClass&#8217;).filter(&#8216;:width(&gt;500)&#8217;).remove();</p>
<p>Did I do something wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WSPanic</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-17330</link>
		<dc:creator>WSPanic</dc:creator>
		<pubDate>Wed, 29 Jul 2009 17:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-17330</guid>
		<description>Wow... Great post. I was in need of a solution to check width of all elements in a given block and if greater than a specified width set them to that width if they exceed it. Your width selector example fits the bill...

Also your examples of using the &#039;data&#039; function opened up my eyes to some possibilities.</description>
		<content:encoded><![CDATA[<p>Wow&#8230; Great post. I was in need of a solution to check width of all elements in a given block and if greater than a specified width set them to that width if they exceed it. Your width selector example fits the bill&#8230;</p>
<p>Also your examples of using the &#8216;data&#8217; function opened up my eyes to some possibilities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: endrew</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-16566</link>
		<dc:creator>endrew</dc:creator>
		<pubDate>Thu, 16 Jul 2009 12:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-16566</guid>
		<description>@Dan: $.data(this)</description>
		<content:encoded><![CDATA[<p>@Dan: $.data(this)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-14792</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 22 Jun 2009 22:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-14792</guid>
		<description>Hi, I&#039;m having trouble using this. As an aid to the my co-developer, I&#039;d like to log the data of any element that has it - what am I doing wrong? 

&lt;pre lang=&quot;javascript&quot;&gt;
$(&#039;:data&#039;).each(
 function()
  {							
    console.info( $(this).data() );
  }
)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m having trouble using this. As an aid to the my co-developer, I&#8217;d like to log the data of any element that has it &#8211; what am I doing wrong?</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">':data'</span><span class="br0">&#41;</span>.<span class="me1">each</span><span class="br0">&#40;</span>
 <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>							
    console.<span class="me1">info</span><span class="br0">&#40;</span> $<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">data</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#41;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Pim</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-13473</link>
		<dc:creator>Pim</dc:creator>
		<pubDate>Tue, 02 Jun 2009 18:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-13473</guid>
		<description>@Anon,
Great thanks for the tip. I have added the regex support. 
Thank you very much for the code/info.</description>
		<content:encoded><![CDATA[<p>@Anon,<br />
Great thanks for the tip. I have added the regex support.<br />
Thank you very much for the code/info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-13158</link>
		<dc:creator>Anon</dc:creator>
		<pubDate>Fri, 29 May 2009 15:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-13158</guid>
		<description>Hi Pim, you can add ~= operator for testing regular expression

case &#039;~&#039;: // regular expression
       exp = querySplitted[1].substr(1,querySplitted[1].lastIndexOf(&#039;/&#039;)-1);
       modif = querySplitted[1].substr(querySplitted[1].lastIndexOf(&#039;/&#039;)+1)
       re = new RegExp( exp, modif);
       return re.test(checkAgainst);
       break;</description>
		<content:encoded><![CDATA[<p>Hi Pim, you can add ~= operator for testing regular expression</p>
<p>case &#8216;~&#8217;: // regular expression<br />
       exp = querySplitted[1].substr(1,querySplitted[1].lastIndexOf(&#8216;/&#8217;)-1);<br />
       modif = querySplitted[1].substr(querySplitted[1].lastIndexOf(&#8216;/&#8217;)+1)<br />
       re = new RegExp( exp, modif);<br />
       return re.test(checkAgainst);<br />
       break;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PIm</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-12811</link>
		<dc:creator>PIm</dc:creator>
		<pubDate>Tue, 26 May 2009 10:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-12811</guid>
		<description>Great article and great selectors.
I especially like the :data() selector. However I needed one that allowed me to query for data objects which are specified like this:
&lt;pre lang=&#039;javascript&#039;&gt;
$(&#039;elem&#039;).data(&#039;foo&#039;, {bar:&#039;el&#039;, baz:{a:2, b:&#039;hai&#039;}, bla:&#039;x&#039;});
&lt;/pre&gt;
So I decided to write my own selector which allows for querying like this:
&lt;pre lang=&#039;javascript&#039;&gt;
$(&#039;elem:data(&quot;foo.baz.b=hai&quot;)&#039;);
&lt;/pre&gt;
It does not support regexes like yours, however you can do ^= $= != *= like the attribute selectors. 
You can have a look at the &lt;a href=&quot;http://code.google.com/p/jquerypluginsblog/source/browse/trunk/dataSelector/jquery.dataSelector.js&quot; rel=&quot;nofollow&quot;&gt;sourcecode here.&lt;/a&gt;

Thanks for the article as this was the article that thought me how to write :selectors in the first place. And inspired me how to create the selector.</description>
		<content:encoded><![CDATA[<p>Great article and great selectors.<br />
I especially like the :data() selector. However I needed one that allowed me to query for data objects which are specified like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'elem'</span><span class="br0">&#41;</span>.<span class="me1">data</span><span class="br0">&#40;</span><span class="st0">'foo'</span><span class="sy0">,</span> <span class="br0">&#123;</span>bar<span class="sy0">:</span><span class="st0">'el'</span><span class="sy0">,</span> baz<span class="sy0">:</span><span class="br0">&#123;</span>a<span class="sy0">:</span><span class="nu0">2</span><span class="sy0">,</span> b<span class="sy0">:</span><span class="st0">'hai'</span><span class="br0">&#125;</span><span class="sy0">,</span> bla<span class="sy0">:</span><span class="st0">'x'</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>So I decided to write my own selector which allows for querying like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'elem:data(&quot;foo.baz.b=hai&quot;)'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>It does not support regexes like yours, however you can do ^= $= != *= like the attribute selectors.<br />
You can have a look at the <a href="http://code.google.com/p/jquerypluginsblog/source/browse/trunk/dataSelector/jquery.dataSelector.js">sourcecode here.</a></p>
<p>Thanks for the article as this was the article that thought me how to write :selectors in the first place. And inspired me how to create the selector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-7824</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 12 Mar 2009 21:47:37 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-7824</guid>
		<description>Great post. Really, really useful.

I just started using jquery in earnest in the last two weeks or so. I keep getting fascinated by the power of this lib.

I didn&#039;t know it was so easy to extend the selectors. I came here searching with Google for a way to select elements with a certain. Like &quot;find all divs with background-color: red&quot;.

That is not AFAIK possible with jquery out of the box, but it seems to be simple to create such a selector!

Thanks a million!</description>
		<content:encoded><![CDATA[<p>Great post. Really, really useful.</p>
<p>I just started using jquery in earnest in the last two weeks or so. I keep getting fascinated by the power of this lib.</p>
<p>I didn&#8217;t know it was so easy to extend the selectors. I came here searching with Google for a way to select elements with a certain. Like &#8220;find all divs with background-color: red&#8221;.</p>
<p>That is not AFAIK possible with jquery out of the box, but it seems to be simple to create such a selector!</p>
<p>Thanks a million!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gonzalo Arreche</title>
		<link>http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/comment-page-1/#comment-4918</link>
		<dc:creator>Gonzalo Arreche</dc:creator>
		<pubDate>Tue, 10 Feb 2009 17:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=237#comment-4918</guid>
		<description>very nice.. really useful.. thanx.. :P</description>
		<content:encoded><![CDATA[<p>very nice.. really useful.. thanx.. <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
