title: EventRender at fullcalendar
body: <p>I'm starting to work with fullcalendar, and I have the following problem. I'm bringing my data into JSON from php with codeigniter, using the function, "eventSources" which has fullcalendar, to bring multiple data into JSON format. Now my problem is that I need to apply the property, "eventRender" but only to one of the data I get, in this case I just want it to apply to ' Calendar / get_alert', however I Is applying to all, and some way to change that? I leave the code I have.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
     $('#fullcalendar').fullCalendar({
        header: {
                 left: 'title',
          center: 'agendaDay,agendaWeek,month',
          right: 'prev,next today'
        },
       editable: true,
       firstDay: 1,
       selectable: true,
       defaultView: 'month',
     
       eventSources: [
                             '&lt;?= base_url() ?&gt;calendar/get_alert',
                             '&lt;?= base_url() ?&gt;calendar/get_Sales',
                             '&lt;?= base_url() ?&gt;calendar/get_purchases'
                            ],
          
     
                            eventRender: function(event, element, view){
                              var el = element.html();
                              element.html("&lt;div style='width:90%;float:left;'&gt;" +  el + "&lt;/div&gt;&lt;div style='text-align:right;' class='close'&gt;&lt;span class='glyphicon glyphicon-trash'&gt;&lt;/span&gt;&lt;/div&gt;");
                  
                              element.find('.close').click(function(){
                               if(!confirm("Delete event?")){
                                 return false;
                               }else{
                               var id = event.id;
                               $.post('&lt;?= base_url() ?&gt;calendar/delete_alert',
                               {
                                  id:id
                               },
                               function(data){
                                if(data == 1)
                                  alert('Successfully deleted');
                                else
                                  alert('Error deleted');  
                               });
                                $("#fullcalendar").fullCalendar('removeEvents', event.id);
                    }         
                });             
            }   
        });  
       });
      &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>new code, The data of each url vien in format JSON</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
     $('#fullcalendar').fullCalendar({
        header: {
                 left: 'title',
          center: 'agendaDay,agendaWeek,month',
          right: 'prev,next today'
        },
       editable: true,
       firstDay: 1,
       selectable: true,
       defaultView: 'month',
     
       eventSources: [
                              {
                               url: '&lt;?= base_url() ?&gt;calendar/get_alert',
                               customRender: true
                              },
                              {
                               url: '&lt;?= base_url() ?&gt;calendar/get_Sales',
                               customRender: false
  
                              },
                              {
                               url: '&lt;?= base_url() ?&gt;calendar/get_purchases',
                               customRender: false,
                              }
                              ],
          
     
                            eventRender: function(event, element, view){
                             if (event.customRender == true)
                              {
                              var el = element.html();
                              element.html("&lt;div style='width:90%;float:left;'&gt;" +  el + "&lt;/div&gt;&lt;div style='text-align:right;' class='close'&gt;&lt;span class='glyphicon glyphicon-trash'&gt;&lt;/span&gt;&lt;/div&gt;");
                  
                              element.find('.close').click(function(){
                               if(!confirm("Delete event?")){
                                 return false;
                               }else{
                               var id = event.id;
                               $.post('&lt;?= base_url() ?&gt;calendar/delete_alert',
                               {
                                  id:id
                               },
                               function(data){
                                if(data == 1)
                                  alert('Successfully deleted');
                                else
                                  alert('Error deleted');  
                               });
                                $("#fullcalendar").fullCalendar('removeEvents', event.id);
                    }         
                });  
              }           
            }   
        });  
       });
      &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>