[Wtr-general] How to identify the nth instance of a div?

Jason & Aneta freezingkiwis at gmail.com
Wed May 2 07:19:39 EDT 2007


Hey all,

Using the 1.5.1.1158 gem and enjoying the class support.

Within my web page, I have the following, with 3 <div> nested inside
the main "content" <div>.

<div class="content">
   <div class="contentItem">
   </div>
   <div class="contentItem">
   </div>
   <div class="contentItem">
   </div>
</div>

How do I retrieve / act within the nth instance, i.e. the 1st, 2nd or
3rd of these "contentItem" divs?


Cheers,

Jason


More information about the Wtr-general mailing list