How to get group of Elements?
Hi,
i have a list of elements like the following sample. Now i've want to group these elements by there nearest elements of same type. But the elements not grouped by parent element.
- <body>
- <!-- Need to build a group of these two teasers-->
- <div class="teaser">
- <h2>Headline</h2>
- <p>Lorem ipsum dolor...</p>
- </div>
- <div class="teaser">
- <h2>Headline</h2>
- <p>Lorem ipsum dolor...</p>
- </div>
- <!-- ignoring this one -->
- <div class="not-interesting-content">
- ...
- </div>
- <!-- building another group of these two or more teasers -->
- <div class="teaser">
- <h2>Headline</h2>
- <p>Lorem ipsum dolor...</p>
- </div>
- <div class="teaser">
- <h2>Headline</h2>
- <p>Lorem ipsum dolor...</p>
- </div>
- ...
- </body>
hope you can help me...
thanks