Commit 10bb55db authored by Markus Sommer's avatar Markus Sommer

[TASK] Optimize output and randomize banner all 8 seconds

parent dd59c75d
......@@ -6,10 +6,10 @@
<li>
<f:link.external class="t3js-banner" uri="{f:uri.external(uri: banner.link)}" target="_blank" additionalAttributes="{data-uid: banner.uid, rel: settings.linkAttributeRel}">
<f:for each="{banner.logo}" as="logo">
<f:image image="{logo}" alt="{banner.name}" />
<f:image image="{logo}" alt="{banner.name}" maxHeight="50" maxWidth="150" />
</f:for>
</f:link.external>
</li>
</f:for>
</ul>
</f:section>
\ No newline at end of file
</f:section>
......@@ -29,6 +29,11 @@ randombanners.countClick = function (bannerId, callback) {
(function () {
randombanners.shuffle('.t3js-banners');
// alert every 2 seconds
setInterval(function () {
randombanners.shuffle('.t3js-banners')
}, 8000);
var banners = document.querySelectorAll('.t3js-banner');
banners.forEach(function (banner) {
banner.addEventListener('click', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment