An ID should be unique. That's why it's callled an ID (IDentifier).
Repeating an ID in a page will cause problems for any DOM work.

For your purposes, you might do something like:

<div class="Foo" id="foo_1"></div>
<div class="Bar" id="bar_1"></div>
<div class="Foo" id="foo_2"></div>
<div class="Bar" id="bar_2"></div>


On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd <k...@riotbrrd.com> wrote:
>
> I realize this is not jQuery specific, but I figured you guys might
> have some good advice...
>
> I often find myself wanting to assign the same ID to multiple elements
> in a document -- typically when there are several versions of an
> element which display at different times. Is there a good reason NOT
> to do this? If so, what's a better practice?
>
> thanks,
> Kim

Reply via email to