I am trying to reposition the image inside .fc-content fullcalendar without repositioning the content.
if ((event.title).toString() == "Present") { eventElement.find("div.fc-content").prepend("<img src='" + event.imageurl + "' width='24' height='24' position = 'relative' float = 'right' bottom = '0'>"); } else if ((event.title).toString() == "Absent"){ eventElement.find("div.fc-content").prepend("<img src='" + event.imageurl + "' width='24' height='24' position = 'relative' bottom = '0'>"); }

I tried position = relative , bottom = 0 , float = right , but nothing worked. Iโm trying to display a โcrossโ sign on the missing one at the bottom left of the cell, where as a โtickโ mark on the present in the lower right corner of the cell.
UPDATED:
The image comes from the controller;
var presentEventList = from e in presentDates select new { id = EnrollNumber, title = "Present", start = ((DateTime)e.Date).ToString("s"), end = ((DateTime)e.Date).ToString("s"), borderColor = "#ffffff", color = "#07b419", imageurl= "/images/checked.png", allDay = false }; var presentRows = presentEventList.ToArray(); var absentEventList = from e in absentDates select new { id = EnrollNumber, title = "Absent", start = ((DateTime)e.Date).ToString("s"), end = ((DateTime)e.Date).ToString("s"), borderColor = "#ffffff", color = "#fa0303", imageurl = "/images/cross.png", allDay = false }; var absentRows = absentEventList.ToArray(); var completeList = (presentEventList.Concat(absentEventList).ToArray()); return Json(completeList, JsonRequestBehavior.AllowGet);
user5675317
source share