<script language="javascript">
$(document).ready(function() {
$(".hidden_info").hide();
$(".clicker").click(function () {
$(this).parent().next(".hidden_info").toggle();
$(".result").empty().html('<img src="/img/load.gif" />');
$.ajax({
url: 'get_person_info.php',
global: false,
type: "GET",
data: ({id : this.getAttribute('id')}),
success: function(data) {
$(".result").html(data);
}
});
});
});
</script>
I am trying to replace the line
$(".result").html(data);
with something like
next$(".result).html(data)
Because Im populating my list dynamically I only want it to load ajax content into the next class named result. Ive been trying to get this now for 5 hours and have tried everything. Any help would be much appreciated.
Here is my html & php code
<tr class="row<?=($var++%2)?>">
<td class="clicker" id="<?=$temp_id?>">
<a href="#"><?=$last_name_results?>, <?=$first_name_results?></a>
</td>
<td><?=$total_difference?></td>
<td><?=$rank_difference?></td>
<td><?=$radio_difference?></td>
<td><?=get_type($type)?></td>
</tr>
<tr class="hidden_info">
<td colspan="5" class="result"></td>
</tr>