Created
August 20, 2013 01:29
-
-
Save Iteratix/6276120 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
{# reset the finished date #} | |
{% for sel, choice in qdict.choices %} | |
var finished_{{ choice.pk }} = false; | |
{% endfor %} | |
var reset_callbacks = function(event) | |
{ | |
{% for sel, choice in qdict.choices %} | |
finished_{{ choice.pk }} = false; | |
{% endfor %} | |
} | |
var time_callback = function(jwtime) | |
{ | |
{% for sel, choice in qdict.choices %} | |
var end_time = {{ choice.timecode }} + {{ choice.duration }}; | |
if(!finished_{{ choice.pk }} && jwtime.position > {{ choice.timecode }} && jwtime.position <= end_time) | |
{ | |
var sel = $('.inputs-list label[for$={{ question.number }}_{{ forloop.counter }}]'); | |
var true_duration = jwtime.position - {{ choice.timecode }} + {{ choice.duration }}; | |
$(sel).effect("highlight", {color: '#0064CD', mode: 'show', easing: 'easeInExpo'}, true_duration * 1000); | |
finished_{{ choice.pk }} = true; | |
} | |
{% endfor %} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment