I have an issue where I have the following jQuery and mark up working although if I move the location of textarea
the .click()
event doesn't fire. I haven't seen this $('element', something)
before. What does the $wrapper
syntax mean please? Thanks,
this.each(function () {
var $field = $(this);
var $wrapper = $field.parent();
$('.myClass', $wrapper)
.click(function () {
// do stuff
});
<div>
<textarea></textarea>
<img src="x" class="myClass" />
</div>