I'm using fullcalender with jQuery and I'm wonder if its possible, if my array has 'bold' = true/false,
I could use jquery to attach a new class to it.
$(document).ready(function() {
$('#calendar').fullCalendar({
editable: false,
allDay: false,
events: "json-events.php",
eventDrop: function(event, delta) {
alert(event.title + ' was moved ' + delta + ' days
' +
'(You cannot update these fields!)');
},
loading: function(bool) {
if (bool) $('#loading').show();
else $('#loading').hide();
},
});
});
If I had a database value id 'bold' can I make jquery add a style the 'title'.
$result = $dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row){
$return[]=array('id'=>$row['id'],
'title'=>$row['title'],
'start'=>$row['start'].' '.$row['time'],
'end'=>$row['end'],
'url'=>$row['url'],
'backgroundColor'=>$row['backgroundColor'],
'textColor'=>$row['textColor'],
'borderColor'=>$row['borderColor'],
'description'=>$row['description'],
"allDay" => false);
}
$dbh = null;
header('Content-type: application/json');
echo json_encode($return);
I'd like to use jQuery or edit the phpscript possibly. But I do not want to edit fullcalender.js file.
EDIT
I've been looking more into this, and if events: "json-events.php" I could add a function that would add bold style to the css.
$(document).ready(function() {
$('#calendar').fullCalendar({
editable: false,
allDay: false,
events: function() {...
maybe by adding variables of getElementById and if it is true, have it append a style to the css.