103
rated 0 times
[
108]
[
5]
/ answers: 1 / hits: 54152
/ 13 Years ago, mon, january 16, 2012, 12:00:00
I have a parent div gal1
, inside which there can be further divs and content, but only one img
element without an id as you can see below. Now I want to use only Javascript (no jQuery) to change the style of this image, using gal1
as argument (because the rest of the structure inside this div may vary, only this one image will always be there somewhere). I couldn't find any other stackoverflow question that addresses exactly my situation.
<div class=gallery-preview id=gal1>
<div class=gallery-preview-img id=gal-img1>
<img src=galleries/kevin-carls/Monks.jpg>
</div>
<div class=gallery-preview-text id=gal-text1>
<span class=gallery-name href=>Road to India</span><br/>
<span class=artist-name href=>Kevin Carls</span>
</div>
</div>
More From » html