How can I reach this element ?
Hello,
I have a table, like this :
<table class="tablesorter pager" id="rapport_etudes" style="width:1960px;">
<tr>
<td>
<select name="rapport_etudes[1][internationale]" iclass="rapport_etude_internationale">
<option value="0">Non</option>
<option value="1">Oui</option>
</select>
<div class="rapport_etude_internationale_details">
<select name="rapport_etudes[1][internationale_details_nationalite]" id="rapport_etude_internationale_details_nationalite">
<option value="0">Client français</option>
<option value="1">Client étranger</option>
</select>
</div>
<td>
</tr>
<tr>
<td>
<select name="rapport_etudes[1][internationale]" class="rapport_etude_internationale">
<option value="0">Non</option>
<option value="1">Oui</option>
</select>
<div class="rapport_etude_internationale_details
">
<select name="rapport_etudes[1][internationale_details_nationalite]" id="rapport_etude_internationale_details_nationalite">
<option value="0">Client français</option>
<option value="1">Client étranger</option>
</select>
</div>
<td>
</tr>
</table>
By default, the <div class="rapport_etude_internationale_details"> are hidden.
I'd like to use jQuery, so when a user change the
<select name="rapport_etudes[][internationale]"> from 0 to 1, the <div> of this cell appears.
At the moment, i'm using
- $(".rapport_etude_internationale").change(function() {
$(".rapport_etude_internationale_details").slideToggle();
});
but as soon as I get 2 rows, both div appear. How I can reach only the one in the cell I'm interacting with ?