Anuradha Anuradha - 1 month ago 18
jQuery Question

Delete one days total events using an image

Here I am added an image to day cell using css:

.fc-widget-content::after {
margin-top: 1 px;
margin-left: 70 px;
font-family: 'FontAwesome';content:"\f00d";
position: absolute;
white-space: pre;
color:#F00;
}


when we click on this icon i want to delete all events on that particular day.here i am using
jquery, fullcalendar.js
. I am using day click function also.

dayClick: function(date, jsEvent, view) {
alert('Clicked on: ' + date.getDate()+"/"+date.getMonth()+"/"+date.getFullYear());
},


but here i got date when click on day,but my requirement is when i click on that icon i can delete total events on that day.Please help.
Thanks.

Answer

Yo can't do it that way. ::after is not part of the DOM so it's not accesible using Javascript.

In this answer you could find some methods to fix your problem.