<?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: Using jQuery to mimic CSS3&#039;s :nth-last-child</title>
	<atom:link href="http://slash25.com/2009/06/using-jquery-to-mimic-css3s-nth-last-child/feed/" rel="self" type="application/rss+xml" />
	<link>http://slash25.com/2009/06/using-jquery-to-mimic-css3s-nth-last-child/</link>
	<description>Code that works&#8230;, Beautifully.</description>
	<lastBuildDate>Thu, 25 Jun 2009 17:42:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Patrick</title>
		<link>http://slash25.com/2009/06/using-jquery-to-mimic-css3s-nth-last-child/#comment-5</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 25 Jun 2009 17:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://slash25.com/?p=216#comment-5</guid>
		<description>Steve, I need to dig some more, because I&#039;m getting two different behaviors from this code in IE7 on two sites where I use this trick. Your idea looks like it&#039;d work fine, so that might be the bulletproof trick for IE7 &amp; IE6.</description>
		<content:encoded><![CDATA[<p>Steve, I need to dig some more, because I&#8217;m getting two different behaviors from this code in IE7 on two sites where I use this trick. Your idea looks like it&#8217;d work fine, so that might be the bulletproof trick for IE7 &amp; IE6.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Stedman</title>
		<link>http://slash25.com/2009/06/using-jquery-to-mimic-css3s-nth-last-child/#comment-4</link>
		<dc:creator>Steve Stedman</dc:creator>
		<pubDate>Thu, 25 Jun 2009 17:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://slash25.com/?p=216#comment-4</guid>
		<description>Nice! Too bad that darn IE always spoils the party (FWIW, Firefox adds :nth-* in v3.5 http://hacks.mozilla.org/2009/06/css3-nth/).

Would IE play nice if you apply a &quot;lastRow&quot; class to the last li elements and then style the &quot;li.lastRow span&quot; selector?

&lt;pre lang=&quot;javascript&quot;&gt;
// goal: add classes to the last row of list items so that we can use CSS  to remove the bottom border
$(function(){
  // add the &#039;lastRow&#039; class to the last
  $(&#039;#authors li:last&#039;).addClass(&#039;lastRow&#039;)
    // then check to see if the previous  has the &#039;even&#039; class already present
    // before adding a lastRow class to it
    .prev().filter(&#039;.even&#039;).addClass(&#039;lastRow&#039;);
});
&lt;/pre&gt;

And then the CSS looks like:

&lt;pre lang=&quot;css&quot;&gt;
#authors li.lastRow span {
    border-bottom: none;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Nice! Too bad that darn IE always spoils the party (FWIW, Firefox adds :nth-* in v3.5 <a href="http://hacks.mozilla.org/2009/06/css3-nth/)" rel="nofollow">http://hacks.mozilla.org/2009/06/css3-nth/)</a>.</p>
<p>Would IE play nice if you apply a &#8220;lastRow&#8221; class to the last li elements and then style the &#8220;li.lastRow span&#8221; selector?</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// goal: add classes to the last row of list items so that we can use CSS  to remove the bottom border</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// add the 'lastRow' class to the last</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#authors li:last'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'lastRow'</span><span style="color: #009900;">&#41;</span>
    <span style="color: #006600; font-style: italic;">// then check to see if the previous  has the 'even' class already present</span>
    <span style="color: #006600; font-style: italic;">// before adding a lastRow class to it</span>
    .<span style="color: #660066;">prev</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.even'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'lastRow'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And then the CSS looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#authors</span> li<span style="color: #6666ff;">.lastRow</span> span <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
</channel>
</rss>
