I created a modal with Bootstrap, and created in a separate file a timer in Javascript. But I wanted this timer to roll inside the Modal. How do I proceed? Thank you!
Modal code:
<div class="bs-example">
<div id="QuestaoModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body" width="200px">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</div>
Countdown Code:
<html>
<head>
<script type="text/javascript">
var segundo = new Number();
var segundo = 180;
function start() {
if ((segundo - 1) >= 0) {
tempo.innerText = count;
count = count - 1;
setTimeout('start();', 1000);
}
}
</script>
</head>
<body onload="start();">
div id ="tempo"></div>
</body>
</html>