Find div inside table cell with selector
I need a little help if possible because I cannot find the attritube source of the image with the selector
I've used it $(this).children('someclass')
before and the one I'm trying to find is in the same table cell next to anotherdiv
$(".reg_info_body").hide();
$(".reg_info").toggle(function(){
$(this).children(".reg_info_body").slideDown(100);
var $bb = $(this).parent().next(".img_uitklapbaar").attr("src");
alert("source img: " + $bb); // for testing
}, function(){
$(this).children(".reg_info_body").slideUp(300);
}
);
<tr class="reg_rij">
<td width="20%"><div class="reg_form_label">Voornaam:</div></td>
<td width="12%" class="reg_info" > <input type="text" class="reg_invoer" name="voornaam"
size="20" maxlength="20" value="<?php if (isset($trimmed['voornaam'])) echo $trimmed['voornaam']; ?>" /></td>
<td width="4%" class="reg_info">?*</td>
<td width="64%" class="reg_info"><div class="reg_info_body"><h4>? -: Voornaam [verplicht]</h4><p>
Vul hier uw voornaam in</p></div>
<div align="right"><img class="img_uitklapbaar" src="../images/expand_icon.gif" width="16" height="16" /></div></td>
</tr>
0
Richard
a source
to share
2 answers
I may have changed it a little too, but it's not entirely accurate
var $bb = $(this).parent().find(".img_uitklapbaar").attr("src");
I will keep my previous opening for the moment see example
0
Richard
a source
to share