开发者

Jquery FullCalendar linked to GCal with modal popup

Okay... I am still fairly new to using jquery and javascripting. I ha开发者_开发问答ve successfully implemented the Jquery FullCalendar on my site and linked it to GCal events.

Is there any way I can have the events, when clicked, to popup in a Modal Window? ie. just like how the embedded calendar that google provides.

My code:

$(document).ready(function () {

    $('#calendar').fullCalendar({
        theme: true,
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        editable: true,
        events: $.fullCalendar.gcalFeed(
        "http://www.google.com/calendar/myxlmfeed"
    ),
        eventClick: function (event) {
            if (event.url) {
                window.open(event.url);
                return false;
            }
        }
    });

});

The code I provided has an eventClick but it opens a new window, anyway I can code that so it opens a simple modal popup?

Any help on this would be so appreciated!

Jay


use nyromodal, a popular jQuery plugin, and modify your code appropriately:

<script type='text/javascript'>
$(document).ready(function () {
    $('#calendar').fullCalendar({
        editable: true,

        events: "some json URL",

        eventClick: function (event) {
            $.nyroModalManual({
                url: event.url
            });
            return false;
        }
    });
});

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜