i am developing a classroom students attendance site, what i am doing and what i expected my php coding, its working fine... when update attendance each student just click over each student thumbnails from students list page, its working...
my question is i had added a add description button for each students over thumbnails, its invisible, when user hover mouse over student thumbnails only show this button, then i had added a toggle show/hide div with button, when user click this visible button my small form div will display...
this is i used for toggle show/hide div with button...
HTML
<div id='content'>form content here</div>
<input type='button' id='hideshow' value='add description'>
Jquery
jQuery(document).ready(function(){
jQuery('#hideshow').live('click', function(event) {
jQuery('#content').toggle('show');
});
});
its working when click add description button, but my problem is if i have more than 2 or above students my list when i click this button all students form content div display now, i need only one student div display, i mean which student above button we click, only that display... i think this problem because of used unique id, how to fix it.? any idea.???
EDIT this is my php generated students list display
<?php if ($students) { ?>
<?php foreach ($students as $student) { ?>
<div class="student">
<div class="thumb">
<div class="content" style="display:none;">
DIV CONTENT HERE
</div>
<input type='button' id='hideshow' value='add description'>
<img class="img" src="<?php echo $student['image']; ?>" alt="<?php echo $student['name']; ?>" />
</div>
<div class="name"><?php echo $student['name']; ?><?php echo $student['student_id']; ?></div>
</div>
<?php } else { ?>
<div class="empty"><?php echo $text_empty; ?></div>
<?php } ?>
<?php } ?>
this is the screenshot what i got now...

this is what i really looking for

thanks...