Move some js from template to ux.js.

This commit is contained in:
Rasmus Kaj 2017-12-11 23:35:23 +01:00
parent 7d2d3f6ebb
commit 09a88d8299
2 changed files with 4 additions and 4 deletions

View File

@ -49,8 +49,4 @@
}
</div>
</div>
<script type="text/javascript">
var e = document.querySelector('.details .item');
e.addEventListener('click', function()@{ e.classList.toggle('zoom');@});
</script>
})

4
ux.js
View File

@ -15,4 +15,8 @@
}
return true;
};
let i = document.querySelector('.details .item');
if (i) {
i.addEventListener('click', e => { i.classList.toggle('zoom') });
}
})(document)