I'm using the Primefaces Schedule component to render events in my web app. But i need to do a little trick with him. For each rendered event i need to show a tooltip with event details. Using the window.onload listener and some jquery functions is easy to display the tooltips of the current date frame. But, since the schedule uses ajax to display the next date frame when i press the next and prev buttons, the tooltip crashes. I've tried using the:
window.addEventListener('DOMSubtreeModified', function(){
// create bubble popups
$('.fc-event-inner.fc-event-skin').CreateBubblePopup( options );
}, false);
But seems that it requires too much processing and the page gets slow. There is some other way to add the tooltips to each event rendered?
delegate
oron
? to bind those tooltips ? something like$(document).delegate(".fc-event-inner.fc-event-skin", "hover", function (event) {if( event.type === 'mouseenter' ) {$('.fc-event-inner.fc-event-skin').CreateBubblePopup( options );}});
– Danielmouseenter
and second formouseleave
try only.fc-event-inner
or only.fc-event-skin
$(document).delegate(".fc-event-inner", "hover", function (event) { if( event.type === 'mouseenter' ) { $('.fc-event-inner.fc-event-skin').CreateBubblePopup( options ); } else{ //hide? } });
– Danielmouseenter
mouseover
mouseover
– Daniel