I am selecting time slot on dragging on Exam time cell. After selecting time slot, I enter student name in textbox and click on select student button then student name goes to selected time slot.
Using below code i am getting start time and end time of highlighted cell but it showing me blank values.
what is wrong with my code.
var mins = $('td.csstd:first');
var hrs = mins.parent().prevAll().andSelf().find('td:first-child').
filter(function () {
return $.trim($(this).text()) !== '';
}).last();
alert(hrs.text() + mins.text());
I think the problem that you have is in this line
‘this’ is not referring to any value. You need to set you variables ‘min’ and ‘hrs’ to a variable and then place that into this place. To test, when you put ‘hrs’ into this spot, it will return a value.