Reputation: 1070
I have this code:
<div id='divid'>
<img class='showimg' src='..' />
<img class='hideimg' src='..' style='display:none;' />
</div>
And I want to select the image inside the div with class 'showimg'.
I have tried $(#divid.showimg)
but that doesnt seem to work..
How can I do this?
Thank you.
Upvotes: 0
Views: 127
Reputation: 724592
You need to add a space between the ID and class, otherwise you are trying to select elements with both the ID and the class:
$('#divid .showimg')
Upvotes: 2