aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorMaZderMind2014-12-23 13:36:01 +0100
committerMaZderMind2014-12-23 13:36:01 +0100
commit10b5e9b9e2357755bc8e155c92a50206b80d27f7 (patch)
tree339d3021093f6fd38891666d7dfc7ee9eddeecbe /assets
parent0d96b29d2fd96a5f32d98f63a55923a580f13f74 (diff)
update teaser images every 10s
Diffstat (limited to '')
-rw-r--r--assets/js/lustiges-script.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js
index f01c0e1..37e6838 100644
--- a/assets/js/lustiges-script.js
+++ b/assets/js/lustiges-script.js
@@ -392,3 +392,25 @@ $(function() {
$('.feedback-thankyou').show();
});
});
+
+
+// update teaser images
+$(function() {
+ setInterval(function() {
+ $('.rooms .lecture .teaser').each(function() {
+ var
+ $teaser = $(this),
+ $preload = $('<img />'),
+ src = $teaser.data('src');
+
+ if(!src) {
+ src = $teaser.prop('src');
+ $teaser.data('src', src);
+ }
+
+ $preload.on('load', function() {
+ $teaser.prop('src', $preload.prop('src'));
+ }).prop('src', src + '?'+(new Date()).getTime());
+ });
+ }, 1000*10);
+});