I have html code like this :
<td class="fc-day fc-widget-content fc-sun fc-past" data-date="2016-07-17"></td>
<td class="fc-day fc-widget-content fc-mon fc-past" data-date="2016-07-18"></td>
I want to append html if the data-date come's in between startdate and enddate.
$(document).ready(function(){
var d = $(".fc-day").data('date');
$.ajax({
url : '<?php echo base_url()."admin/utilities/get_task_assign_staff" ?>',
dataType : 'json',
success : function(responce){
$(".fc-day").each(function(){
var d = $(".fc-day").data('date');
if(d == responce[0].startdate)
{
this.append("<span class='fc-title'>"+responce[0].name+"</span>");
}
});
}
});
});
For Example, my startdate is 2016-07-05 and enddate is 2016-07-09 than append responce[0].name to the given <td> that data-date come's in between startdate and enddate.
So what jQuery should I have to write?