Hi! I need help over my codes:
This code is to make a text field appear when the checkbox is selected
PHP Code:
$(document).ready(function(){
$("#ben").click(function(){
$("#benamount").toggle("fast");
$(this).toggleClass("active");
document.adminForm.ben.checked = true;
return false;
});
});
And this is the form part..
PHP Code:
<input type = 'Checkbox' id="ben" value ="net"></input>
<input style="display:none;" type='text' id="benamount"></input>
But, I need to make the checkbox and the text field on loop. I need them on array. How will I do it? I need them to be dynamic, that's why I put them on array.
Please help. the script will only work on the first element but not on the succeeding elements. Thank you!!!!