In this page of multi-days festivals
https://www.metropub.net/www.italiajazz.it/calendario-festival
I added the following JS
https://www.metropub.net/www.italiajazz.it/sites/default/files/js_injector/js_injector_5.js
jQuery( document ).ready(function()
{
console.log( "ready!" );
jQuery('.fc-event-hori').on('mouseenter', function()
{
x = jQuery(this).text();
jQuery("a.fc-event-hori:contains('" + x + "')").css("background", "#fccd45");
console.log('in');
});
jQuery('.fc-event-hori').on('mouseleave', function()
{
x = jQuery(this).text();
jQuery("a.fc-event-hori:contains('" + x + "')").css("background", "#15242a");
console.log('out');
});
});
for extend the hover of the mouse to the festival that are spanned over more than one week.
It works for the first page, but when I change the month, it doesn't work anymore.
Looking for solution on different threads, for example this link
jQuery selector doesn't update after dynamically adding new elements
I modified my original code implementing the "delegated event handling", but my code still works only in the first page.
Am I missing something else?