I have the following:
<form id="my_form">
<input type="checkbox" name="a" value="a"> Check <img src="..." />
</form>
To handle the check and uncheck events I do (and this works):
$('#my_form :checkbox).click(function() {
if($(this).is(':checked')) {
//...
}
//...
});
My question is: inside of that click function, how can I select the <img> tag that is right beside the checkbox? Can I do this without specifying an ID for the image? ..by "select" I mean that I need to be able to hide() and show() it. Thanks