79191791

Date: 2024-11-15 09:44:15
Score: 1.5
Natty:
Report link

Can someone help me and figure out where the problem is?

You are using Fullcalendar v3, which is quite outdated - and had a significantly different API.

In v3, the event is named eventMouseover, see https://fullcalendar.io/docs/v3/event-clicking-hovering, and it passes different parameters to the callback function as well.

https://fullcalendar.io/docs/v3/eventMouseover:

Within the callback function, this is set to the event’s <div> element.

So what you need here, with v3 of Fullcalendar, is simply this:

eventMouseover: function() {
  this.style.backgroundColor = "red";
}

And the counterpart for eventMouseLeave back in v3 was eventMouseout.

(Notice that I modified the way the background color is manipulated a tiny bit here as well. Directly accessing the property you want to manipulate, is a bit "safer", than assigning a new value to the whole style object, which can have other side effects. And even better would be not to use inline styles in the first place - but add/remove a class on the element, and then let the desired formatting apply via a corresponding rule in your stylesheet.)

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Can someone help me
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can someone help me
  • High reputation (-2):
Posted by: C3roe