5
I have a code in jQuery that performs the creation of a calendar that you can leave reminders on the date. The code is as follows:
 var calendar = $('#calendar').fullCalendar({
        slotDuration: '00:15:00', /* If we want to split day time each 15minutes */
        minTime: '08:00:00',
        maxTime: '19:00:00',          
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        events: [
        {
            title: 'teste!',
            start: new Date(y, m, 3),
            className: 'bg-purple'
        }, 
        {
            title: 'teste 2!',
            start: new Date(y, m, 1),
            className: 'bg-red'
        }, 
        {
            title: 'See John',
            start: '2014-05-05 10:00:00',
            start: '2014-05-05 11:00:00',
            className: 'bg-red'
        }
        ],
The part that makes the creation of reminders is "Events:" , I would like to pull the events from a PHP page and carry out the same code creation process as Events, that:
events: [
    {
        title: 'teste!',
        start: new Date(y, m, 3),
        className: 'bg-purple'
    }, 
I mean, I have a PHP that has a echo and in it has the code above, jQuery has to pull and form this type of code. The problem is I can’t do it.
Look for jQuery ajax, I do not understand much ajax with jQuery so I will not give an answer.
– Olimon F.
pull ajax until I know, but I need to know how to form the code of that guy with the appropriate keys and brackets ([ and {)
– Alisson Acioli