fix: js error

This commit is contained in:
atomiks
2018-03-24 17:33:20 +10:00
parent d98ed4203a
commit 3455066bc9
5 changed files with 16 additions and 14 deletions

View File

@ -58,7 +58,7 @@ el.style.setProperty('--max-height', height + 'px')
</style>
<script>
(function () {
;(function () {
var el = document.querySelector('.snippet-demo__height-transition__el')
var height = el.scrollHeight
el.style.setProperty('--max-height', height + 'px')

View File

@ -105,7 +105,7 @@ btn.onmousemove = function(e) {
</style>
<script>
(function () {
;(function () {
var btn = document.querySelector('.snippet-demo__mouse-cursor-gradient-tracking')
btn.onmousemove = function (e) {
var x = e.pageX - btn.offsetLeft - btn.offsetParent.offsetLeft