The following code obtains information from a database and stores it in a respective div of a modal and then displays it on the screen:
eventClick:function(calEvent,jsEvent,view){
$('#titulo').html(calEvent.title);
FechaInicio = calEvent.start._i.split(" ");
$('#fecha-inicio').html(FechaInicio[0]);
$('#hora-inicio').html(FechaInicio[1]);
FechaCierre = calEvent.end._i.split(" ");
$('#fecha-cierre').html(FechaCierre[0]);
$('#hora-cierre').html(FechaCierre[1]);
$('#tipo').html(calEvent.Tipo);
$('#lugar').html(calEvent.Lugar);
$('#fecha-encuentro').html(calEvent.Fecha_encuentro);
$('#hora-encuentro').html(calEvent.Hora_encuentro);
$('#punto-encuentro').html(calEvent.Punto_encuentro);
$('#material-individual').html(calEvent.Material_individual);
$('#material-equipo').html(calEvent.Material_equipo);
$('#ficha').html(calEvent.Ficha);
$("#modal").modal();
}
Then there is the modal code:
<div class="modal-body">
<div class="container">
<div class="row">
<div class="col">
<strong>Fecha inicio:</strong><div id="fecha-inicio"></div>
<strong>Fecha cierre:</strong><div id="fecha-cierre"></div>
<strong>Lugar:</strong><div id="lugar"></div>
<strong>Fecha encuentro:</strong><div id="fecha-encuentro"></div>
<strong>Punto encuentro:</strong><div id="punto-encuentro"></div>
<strong>Material individual:</strong><div id="material-individual"></div>
</div>
<div class="col">
<strong>Hora inicio:</strong><div id="hora-inicio"></div>
<strong>Hora cierre:</strong><div id="hora-cierre"></div>
<strong>Tipo:</strong><div id="tipo"></div>
<strong>Hora encuentro:</strong><div id="hora-encuentro"></div>
<strong>Material equipo:</strong><div id="material-equipo"></div>
</div>
</div>
</div>
What I want is that when in the fullcalendar js some of the .HTML is empty then in the modal the div and the strong are hidden in the modal.
I thank you in advance for any help to solve this problem.