Id must to be unique.

So, jQuery just find one element with the specified Id,

try to make id uniques
----- Original Message ----- From: "Alexandre" <alexandre...@gmail.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Thursday, July 16, 2009 3:40 PM
Subject: [jQuery] addclass() only works with the first of the matched divs



Hi,

I'm having an annoying issue with addClass()

I'm trying to find all divs with id name '#moldura_slides' and add the
class '.horizontal' to each one of them.
The problem is that only the first div matched gets the class. The
others are just ignored and don't get it.

$(document).ready(function()
{
    $("#moldura_slides").addClass("horizontal");
});


Looked for a solution everywhere and tried other ways of doing this.
Nothing worked. Any ideas?

This is the page: http://www.labbi.com.br/index5.html

Thanks

Reply via email to