<?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: .closest()</title>
	<atom:link href="http://api.jquery.com/closest/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/closest/</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: Yi3artist</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-8373</link>
		<dc:creator>Yi3artist</dc:creator>
		<pubDate>Sun, 16 Jan 2011 09:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-8373</guid>
		<description>That would be lightning, but I completely agree. And &quot;travelling up the lightning&quot; sounds much much cooler. And now that browsers and servers faster, any plant growth analogy just seems too slow...</description>
		<content:encoded><![CDATA[<p>That would be lightning, but I completely agree. And &#8220;travelling up the lightning&#8221; sounds much much cooler. And now that browsers and servers faster, any plant growth analogy just seems too slow&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lw</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-7874</link>
		<dc:creator>Lw</dc:creator>
		<pubDate>Wed, 29 Dec 2010 16:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-7874</guid>
		<description>shouldbe then &quot;thunder&quot;&lt;br&gt;&lt;a href=&quot;http://rajatarora.info/diary/wp-content/uploads/2010/07/thunder.jpg&quot; rel=&quot;nofollow&quot;&gt;http://rajatarora.info/diary/w...&lt;/a&gt;&lt;br&gt;&lt;br&gt;:)</description>
		<content:encoded><![CDATA[<p>shouldbe then &#8220;thunder&#8221;<br /><a href="http://rajatarora.info/diary/wp-content/uploads/2010/07/thunder.jpg" rel="nofollow">http://rajatarora.info/diary/w&#8230;</a></p>
<p> <img src='http://api.jquery.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lw</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-7827</link>
		<dc:creator>Lw</dc:creator>
		<pubDate>Wed, 29 Dec 2010 08:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-7827</guid>
		<description>shouldbe then &quot;thunder&quot;&lt;br&gt;&lt;a href=&quot;http://rajatarora.info/diary/wp-content/uploads/2010/07/thunder.jpg&quot; rel=&quot;nofollow&quot;&gt;http://rajatarora.info/diary/w...&lt;/a&gt;&lt;br&gt;&lt;br&gt;:)</description>
		<content:encoded><![CDATA[<p>shouldbe then &#8220;thunder&#8221;<br /><a href="http://rajatarora.info/diary/wp-content/uploads/2010/07/thunder.jpg" rel="nofollow">http://rajatarora.info/diary/w&#8230;</a></p>
<p> <img src='http://api.jquery.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitridates</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-7547</link>
		<dc:creator>Mitridates</dc:creator>
		<pubDate>Mon, 13 Dec 2010 16:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-7547</guid>
		<description>It does not work for me, but it does:&lt;br&gt;var parent_id = this.parents(&#039;.myclass&#039;).attr(&#039;id&#039;);&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>It does not work for me, but it does:<br />var parent_id = this.parents(&#39;.myclass&#39;).attr(&#39;id&#39;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suggesto</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-6547</link>
		<dc:creator>suggesto</dc:creator>
		<pubDate>Sun, 24 Oct 2010 07:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-6547</guid>
		<description>How about changing the example of the li traversals to something a bit more readable like:&lt;br&gt;- Wiliam I&lt;br&gt;-- Richard&lt;br&gt;-- Adeliza&lt;br&gt;-- Henry I&lt;br&gt;--- Matilda&lt;br&gt;&lt;br&gt;Something based on this maybe: &lt;a href=&quot;http://en.wikipedia.org/wiki/English_monarchs_family_tree&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/English_monarchs_family_tree&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>How about changing the example of the li traversals to something a bit more readable like:<br />- Wiliam I<br />&#8211; Richard<br />&#8211; Adeliza<br />&#8211; Henry I<br />&#8212; Matilda</p>
<p>Something based on this maybe: <a href="http://en.wikipedia.org/wiki/English_monarchs_family_tree" rel="nofollow">http://en.wikipedia.org/wiki/English_monarchs_family_tree</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Huckestein</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-4201</link>
		<dc:creator>Jonas Huckestein</dc:creator>
		<pubDate>Thu, 15 Jul 2010 20:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-4201</guid>
		<description>Warning: closest does not work with an array of jQuery objects like follows:&lt;br&gt;&lt;br&gt;$(&quot;.something&quot;).closest([$(&quot;.something2&quot;), $(&quot;.something3&quot;)])&lt;br&gt;&lt;br&gt;The reason is because internally closest() uses the elements of the passed array as object keys and they overwrite one another because objects all serialize to &quot;[object Object]&quot;. This is not really a bug but could easily be avoided.&lt;br&gt;&lt;br&gt;A workaround for this is using add() (although it doesn&#039;t really feel efficient):&lt;br&gt;&lt;br&gt;$(&quot;.something&quot;).closest([$(&quot;.something2&quot;).add($(&quot;.something3&quot;))])</description>
		<content:encoded><![CDATA[<p>Warning: closest does not work with an array of jQuery objects like follows:</p>
<p>$(&#8220;.something&#8221;).closest([$(".something2"), $(".something3")])</p>
<p>The reason is because internally closest() uses the elements of the passed array as object keys and they overwrite one another because objects all serialize to &#8220;[object Object]&#8220;. This is not really a bug but could easily be avoided.</p>
<p>A workaround for this is using add() (although it doesn&#39;t really feel efficient):</p>
<p>$(&#8220;.something&#8221;).closest([$(".something2").add($(".something3"))])</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andir</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-4136</link>
		<dc:creator>Andir</dc:creator>
		<pubDate>Mon, 12 Jul 2010 09:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-4136</guid>
		<description>I&#039;m no fan of the name: closest could refer to the children as well and it can be confusing to a casual reader.&lt;br&gt;&lt;br&gt;If you have a div outside a table and a div in one of the cells, if you want the closest div to the td it should be the child (which is one element away), not the parent(which is at least four elements away traversing up the table definition.)</description>
		<content:encoded><![CDATA[<p>I&#39;m no fan of the name: closest could refer to the children as well and it can be confusing to a casual reader.</p>
<p>If you have a div outside a table and a div in one of the cells, if you want the closest div to the td it should be the child (which is one element away), not the parent(which is at least four elements away traversing up the table definition.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guffa</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-11551</link>
		<dc:creator>Guffa</dc:creator>
		<pubDate>Sun, 06 Jun 2010 23:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-11551</guid>
		<description>A family tree works rather well as a tree, and plenty of them are drawn that way, actually with an image of a real tree as background. However, as you say, it&#039;s impractical to represent hierarchical data with the root at the bottom, so the tree analogy (or metaphor or whatever) whould be avoided.</description>
		<content:encoded><![CDATA[<p>A family tree works rather well as a tree, and plenty of them are drawn that way, actually with an image of a real tree as background. However, as you say, it&#8217;s impractical to represent hierarchical data with the root at the bottom, so the tree analogy (or metaphor or whatever) whould be avoided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WaltW</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-3112</link>
		<dc:creator>WaltW</dc:creator>
		<pubDate>Tue, 18 May 2010 16:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-3112</guid>
		<description>Maybe I&#039;m misunderstanding what you&#039;re asking for, but can&#039;t you just call $.fn.parents(&#039;ul&#039;) to find all of the parents of jQuery elements matching a selector?  &lt;br&gt;&lt;br&gt;$.fn.closest(sel)  &lt;=&gt; $.fn.parents(sel + &#039;:first&#039;)&lt;br&gt;&lt;br&gt;Isn&#039;t that right?</description>
		<content:encoded><![CDATA[<p>Maybe I&#39;m misunderstanding what you&#39;re asking for, but can&#39;t you just call $.fn.parents(&#39;ul&#39;) to find all of the parents of jQuery elements matching a selector?  </p>
<p>$.fn.closest(sel)  &lt;=&gt; $.fn.parents(sel + &#39;:first&#39;)</p>
<p>Isn&#39;t that right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephenrs</title>
		<link>http://api.jquery.com/closest/comment-page-1/#comment-11152</link>
		<dc:creator>stephenrs</dc:creator>
		<pubDate>Thu, 06 May 2010 22:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=294#comment-11152</guid>
		<description>Sounds like you&#039;ve never studied computer science or decision theory. The use of &quot;tree&quot; is a metaphor, not an analogy, and it&#039;s generally impractical to represent a data hierarchy visually by starting with the root at the bottom (try to draw your family tree this way). Traversing &quot;up&quot; the tree to the root makes far more sense to people who speak the language...or whom have ever seen a family tree drawn visually.

Please don&#039;t confuse new users with this misinformation.</description>
		<content:encoded><![CDATA[<p>Sounds like you&#8217;ve never studied computer science or decision theory. The use of &#8220;tree&#8221; is a metaphor, not an analogy, and it&#8217;s generally impractical to represent a data hierarchy visually by starting with the root at the bottom (try to draw your family tree this way). Traversing &#8220;up&#8221; the tree to the root makes far more sense to people who speak the language&#8230;or whom have ever seen a family tree drawn visually.</p>
<p>Please don&#8217;t confuse new users with this misinformation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

