I want to Animate the event in the calendar I have change color.  

So 

1. I select my date Alert from the database, I compare dates (date Alert , today)
2. I change color event
3. I Animate event

```
eventRender: function(event, element) { 

function compareDates() {

var d = new Date();
var today = d.format("yyyy-mm-dd HH:MM:ss");
<?php 
mysql_connect("","","");
mysql_select_db("");
       $requete = mysql_query('SELECT * FROM evenement where id_user=1 ') ;
       while ($ligne=mysql_fetch_array($requete))
       {
        $date=$ligne['dateAlert'];
        $id=$ligne['id_event'];

        ?>

var dateAlert = '<?php echo $date;?>';
if(dateAlert == today){
var id='<?php echo $id;?>';

alert('alert ID rdv:'+id);

var rdv=$('#calendar').fullCalendar( 'clientEvents');
for (i=0; i<=rdv.length-1; i++) {

if(rdv[i].id==id){
rdv[i].backgroundColor='red';
rdv[i].borderColor='red';

    $('#calendar').fullCalendar('renderEvent', id );

        }

}
  //where i put this ligne?

 setInterval(function(){ element.fadeOut(900).delay(300).fadeIn(800);
                        },2000);
}

 <?php }?>

}
    myvar=setInterval(function(){compareDates()},1000);

},

```

What should I do?