You could try this:

if ($('[EMAIL PROTECTED]').length == 2) {
  // do something ?
}

That selector will probably be a little slow, though, depending on the complexity of the DOM, because it has to crawl through every single element. if you can narrow it down to within a certain div, that would help alleviate possible speed bumps.

Cheers,

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 18, 2007, at 9:55 AM, [EMAIL PROTECTED] wrote:


Hi,

How can I use JQuery to discover if a particular ID occurs twice in my
page?  I can't use "View Source' because the DOM is changing as the
user interacts with the page.

Thanks, - Dave


Reply via email to