2

I'm using the fullcalendar and qtip plugins.
I have events with different colors. All I need to do is to have a tooltip that correspond to the colors of full calendar event. I want the qtip(tooltip) color change depending on the event color.
Is that possible?
Thanks.. :)

enter image description here

here are the codes for my qtip

    eventRender: function (event, element) {
        element.qtip({
            content: {
                title: { text: event.title },
                text: '<span class="title" style="font-weight:bold;">Start: </span>' + ($.fullCalendar.formatDate(event.start, 'hh:mmtt')) +
                    '<br><span class="title" style="font-weight:bold;">End: </span>' + ($.fullCalendar.formatDate(event.end, 'hh:mmtt')) +
                    '<br><span class="title" style="font-weight:bold;">Where: </span>' + event.location +
                    '<br><span class="title" style="font-weight:bold;">Description: </span>' + event.description
            },
            position: {
                adjust: { screen: true },
                corner: { target: 'bottomMiddle', tooltip: 'topLeft' }
            },
            show: {
                solo: true, effect: { type: 'slide' }, effect: function () {
                    $(this).fadeTo(200, 0.8);
                }
            },
            hide: { when: 'mouseout', fixed: true },
            style: {
                tip: true, // Give it a speech bubble tip
                border: {
                    width: 2,
                    radius: 5,
                    color: '#474968'

                },
                title: {
                    color: '#fff',
                    background: '#9193c4'
                },
            }
        });
    }  
4

1 回答 1

0

事件对象接受一个className属性。您可以使用它来使用 CSS 为您的事件着色(例如应用“假日”类)。在您的 eventRender 回调中,您可以检查此类的存在( if (event.className === 'holiday') ... )并适当地为您的工具提示着色

于 2012-12-21T06:33:34.980 回答