I want to use the jQuery Dropdown CheckList in a while loop. But in only display the jQuery Dropdown Checklist in the first row. For the rest of the row it didn't call the jQuery Dropdown Checklist function. Is there any way for me to call the jQuery function dynamically.
//This is the java script for calling the dropdown list
<meta http-equiv="refresh" content="600" >
<!-- Apply dropdown check list to the selected items -->
<script type="text/javascript">
$(document).ready(function(){$("#s1").dropdownchecklist( { width: 300 } );});
</script>
//this is the while loop which display the list of row with drop down checklist in it
//display the list of rows
while($rows = mysql_fetch_array($query)){
<select id="s1" multiple="multiple" >
<option value=""></option>
<?php while($rowsakh= mysql_fetch_array($resultakh)) { ?>
<option value='<?php echo $rowsakh['diet_id']; ?>'><?php echo $rowsakh['diet_name']; ?></option> <?php } ?>
</select>
}//end while loop
If I try to make the id="s1"
to be a dynamic variable where it increases for each loop. Is there any way to make the id="s1"
dynamically or the syntax for me to do it.