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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1413,6 +1413,7 @@ el.style.setProperty('--max-height', height + 'px')
}
</style>
<script>
;
(function() {
var el = document.querySelector('.snippet-demo__height-transition__el')
var height = el.scrollHeight
@ -1635,6 +1636,7 @@ btn.onmousemove = function(e) {
}
</style>
<script>
;
(function() {
var btn = document.querySelector('.snippet-demo__mouse-cursor-gradient-tracking')
btn.onmousemove = function(e) {

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