fullcalendar.js - deleting event on button click

后端 未结 5 1687
猫巷女王i
猫巷女王i 2021-02-02 15:36

I am using the fullCalendar.js and the current problem is making i lose so much time on something that might be simple to whose understand javascript (more specific jquery) bett

5条回答
  •  一生所求
    2021-02-02 15:58

    This code may better help you. In this code remove icon display you whenever your mouse moving over event and whenever your mouse goes outside remove button will hide or removed.

    eventMouseover:function(event,domEvent,view){
    
        var el=$(this);
    
        var layer='
    Trash
    '; el.append(layer); el.find(".fc-bg").css("pointer-events","none"); $("#delbut"+event.id).click(function(){ calendar.fullCalendar('removeEvents', event._id); }); }, eventMouseout:function(event){ $("#events-layer").remove(); }

提交回复
热议问题