[JS] Working on another element without an ID

Started by Anguz, November 13, 2004, 05:07:58 AM

Previous topic - Next topic

Anguz

I want to click on a link and have the div that's right after it to be affected. How can I do this without using an id for that div? Is it possible?
Cristián Lávaque http://cristianlavaque.com

Curbow 5

through the DOM me thinks... Do the anchor and the div share the same parent node?

Anguz

Yes, they do, and I thought of using the parent, but there's more than one div child to that parent, so I'm afraid it wouldn't work.

Thanks. :)

I kept banging my head against the monitor until I came up with a way to do it with id. It's working great!

I'll release the mod tomorrow. :D
Cristián Lávaque http://cristianlavaque.com

Advertisement: