Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/template/default/exercise/reading_speed.tpl

48 lines
1.0 KiB

<div class="question-{{ d }}">
<div class="btn-toolbar">
{{ words_count }}
</div>
<div id="question-{{ id }}-text" class="center-block question-text">
{{ text }}
</div>
</div>
<style>
.question-text {
color: #FFF;
text-align: justify;
width: 800px;
}
.text-highlight.active {
color: rgba(0, 0, 0, 1);
}
</style>
<script>
$(document).on('ready', function () {
var index = 0,
total = $('#question-{{ id }}-text .text-highlight').length;
function updateView()
{
$('#question-{{ id }}-text .text-highlight').removeClass('active');
if (index >= total) {
window.clearInterval(timeOuId);
return;
}
var current = $('#question-{{ id }}-text .text-highlight').get(index);
$(current).addClass('active');
index++;
}
updateView();
var timeOuId = window.setInterval(updateView, 6 * 1000);
});
</script>