I person a structure akin to this, and would similar to usage a jQuery
selector to choice the kid img
wrong the div
connected click on.
<div id="..."> <img src="..."></div>
To acquire the div
, I've obtained this selector:
$(this)
However tin I acquire the kid img
utilizing a selector?
The jQuery constructor accepts a 2nd parameter referred to as context
which tin beryllium utilized to override the discourse of the action.
jQuery("img", this);
Which is the aforesaid arsenic utilizing .find()
similar this:
jQuery(this).find("img");
If the imgs you tendency are lone nonstop descendants of the clicked component, you tin besides usage .children()
:
jQuery(this).children("img");
You might besides usage
$(this).find('img');
which would instrument each img
s that are descendants of the div
Mistake producing weblog contented
Spooky Kids Playable FNF Pico Update (Fanmade Concept Mod) #fnfweek8 #fnfupdate #shorts
Spooky Kids Playable FNF Pico Update (Fanmade Concept Mod) #fnfweek8 #fnfupdate #shorts from Youtube.com