4
Good guys, I searched how to do but could not. I want a javascript code that turns on automatically only after midnight. See the code:
var agora = new Date();
var anoNovo = new Date(2017, 0, 1, 0, 0, 0, 0);
var anoNovoMax = new Date(2017, 0, 1, 23, 59, 59, 0);
if(agora >= anoNovo && agora<anoNovoMax)
{
$('#musica').html('<audio autoplay="autoplay" controls="controls" style="display:none"> <source src="../fogos.mp3" type="audio/mp3" /></audio>');
$('#foguetes').html('<div class="fogos"></div>');
}
Thank you very much, it worked!
– Hanz
Mark the answer, @Hanz
– ShutUpMagda