Because I need to horizontally list the items, I have several dl, each contains an image
<dl class="hints" id="hint0"> <dt><img ...></dt> <dd>a</dd> </dl> <dl class="hints" id="hint1"> <dt><img ...></dt> <dd>b</dd> </dl> <dl class="hints" id="hint2"> <dt><img ...></dt> <dd>c</dd> </dl>
I want to use jquery to do something when click on each image. How to get the object of the dl/dt/img? Currently, “$(‘dl.hints dt’).click(function()…” doesn’t work.
Thanks for helping!
As you have mentioned if you want to do some action when i click on image inside dt” of “hints” class.. Then try the below code…