[jQuery] Multiple textboxes with different ID's
I am using the time picker plugin which is basically used for getting
a time value in a textbox similar to google calendar. How can we use
with multiple textboxes. The textboxes are generating dynamically from
server side script and now i need to have a timepicker at eash
textbox, how can this be done ?
This is the JS code,
$(document).ready( function() {
var values=$('input[name="txtTime[]"]').map(function()
{
return $(this).val()
}
).get();
$("txtTime").click(function(){
$(this).timePicker({step:15, startTime:"02:00", endTime:"11:00"});
});
});
and this is the server side code:
for($i=1;$i<=7;$i++)
{
echo "<tr >";
for($j=1;$j<5;$j++ )
{
echo "<td><input type='text' size='5' class='textbox' name='txtTime
[]' value='$i$j' /> ";
echo "</td>";
}
echo "</tr>";
}