I have jquery fullcalendar . I would like to call jQuery QTip (or another jquery solution (e.g. lightbox)) when I click on a day to open a list of options. This question is similar to this question already published , but it is different enough to guarantee a new question.
There is a callback event for this, but I'm not sure how to integrate it using jQuery Qtip ...
$('#calendar').fullCalendar({ dayClick: function(date, allDay, jsEvent, view) { if (allDay) { alert('Clicked on the entire day: ' + date); }else{ alert('Clicked on the slot: ' + date); } alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); alert('Current view: ' + view.name);
This obviously triggers warnings and changes the color of the clicked cell.
Here is another example showing that QTip is integrated for event hangs.
$('#calendar').fullCalendar({ ... eventRender: function(event, element, view) { element.qtip({ content: "My Event: " + event.title }); } ... });
This example shows the guidance callback used to start QTIP.
Now I just need to combine these two examples ...
UPDATE 05/05/2010
Craig on the Qtip forums suggested using viewDisplay callback as an alternative to DayClick callback, which seems to be causing all kinds of problems. (Browser lock is most noticeable).
Here is the message:
Here is the code:
viewDisplay: function() { var calendar = $(this); $(this).qtip({ content: 'TEST', position: { my: 'top center', at: 'top center' }, show: 'click', hide: 'click', style: { tip: true } }) },
This method displays a tooltip when you click on a day. However, a few problems.
- As far as I can tell, there is no date information available through this callback, which makes it difficult to display a tooltip specific to the selected date.
- This callback does not have information about clicks X and Y, which makes it impossible to put a tooltip next to the pressed date.
All help is much appreciated!
Thanks,
Tim