Am using trent’s timepicker addon for generating timepicker in a tabular format. with start time and end time in same row along based on which time difference is calculated.for generating multiple timepicker i used class instead of id. trouble is i would like to generate dynamic id and append a row with calculate() in it .
Below is my current code:
$(document).ready(function() {
//table grid structure follows here
$("#AddRow").click(function() {
var row = '<tr><td>' +'<input type=text /></td>' + '<td><input type=text class="timepicker" value=""/></td>' + '<td><input type=text class="timepicker" value=""/></td>' + '<td><input type=text id= "difference" /></td>' + '<td><button>delete</button>' + '</td></tr>';
$("#table").append(row);
});
$('body').on('focus', ".timepicker", function() {
$(this).timepicker({});
});
$("#table").on("click", "button", function() {
$(this).closest("tr").remove();
});
//table structure ends here
});
Any ways to achieve it ??
The “sessionStorage” is not supported by IE browsers…
Try this…
});