For the first you should close the -Tags correctly with :
content here
content here
content here
$('div.car div') gives you the three div-Elements inside .
With
$('div.car div').click(function(event){
alert(this.className);
})
you bind a function to the click event of every enclose div
$('div.car div'); You should add the tagname if possible, it makes it
MUCH faster.
Use $('div.car > div'); if the divs need to be exactly (one level)
below div.car.
Please... do check the docs, it's faster for everyone:
http://docs.jquery.com/Selectors
Ciao
--
Ariel Flesler
http://flesler.blo
2 matches
Mail list logo