<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Targeting first and fifth item</title>
    <link>http://forums.shopify.com/categories/2/posts/30812</link>
    <language>en-us</language>
    <description>Feed for discussion topic Targeting first and fifth item</description>
    <item>
      <title>Targeting first and fifth item</title>
      <author>creativeBadger</author>
      <pubDate>Sat, 07 Nov 2009 14:55:08 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/30812</link>
      <guid>http://forums.shopify.com/categories/2/posts/30812</guid>
      <description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am hoping someone here can point me in the right direction,&amp;nbsp; I wish to target the first and fifth items in my collection list, so I can give them a class.&amp;nbsp; Both can have the same class as I just need to remove the left padding.&lt;/p&gt;
&lt;p&gt;So I have :--&lt;/p&gt;
&lt;pre&gt;  &amp;lt;li{% if forloop.first %} class="first" {% endif %}&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;which targets the first one fine, but how can i also apply the class "first" to the fifth item :S&lt;/p&gt;
&lt;p&gt;Many thanks in advance!&lt;/p&gt;
&lt;p&gt;Badger&lt;/p&gt;</description>
    </item>
    <item>
      <title>Jamie commented</title>
      <author>Jamie</author>
      <pubDate>Sat, 07 Nov 2009 15:16:07 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/30812#comment-30813</link>
      <guid>http://forums.shopify.com/categories/2/posts/30812#comment-30813</guid>
      <description>&lt;p&gt;Try:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;
&lt;pre&gt;&amp;lt;li class="{% cycle 'first', '', '', '', 'first' %}"&amp;gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>creativeBadger commented</title>
      <author>creativeBadger</author>
      <pubDate>Sat, 07 Nov 2009 16:59:43 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/30812#comment-30819</link>
      <guid>http://forums.shopify.com/categories/2/posts/30812#comment-30819</guid>
      <description>&lt;p&gt;perfect!&lt;/p&gt;
&lt;p&gt;thank you Jamie.&lt;/p&gt;
&lt;p&gt;Badger&lt;/p&gt;</description>
    </item>
    <item>
      <title>Jamie commented</title>
      <author>Jamie</author>
      <pubDate>Sat, 07 Nov 2009 17:15:02 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/30812#comment-30821</link>
      <guid>http://forums.shopify.com/categories/2/posts/30812#comment-30821</guid>
      <description>&lt;p&gt;You're welcome!&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
