a layout similar to this
<div id="..."><img src="..."></div>
use a jQuery selector to select the child img
inside of the div
on click
context
which can be used to override the context of the selection. jQuery("img", this);
Which is the same as using .find()
like this:
jQuery(this).find("img");
If the imgs you desire are only direct descendants of the clicked element, you can also use .children()
:
jQuery(this).children("img");
0 件のコメント:
コメントを投稿