summaryrefslogtreecommitdiff
path: root/public/js/2dtilt.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/2dtilt.js')
-rw-r--r--public/js/2dtilt.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/2dtilt.js b/public/js/2dtilt.js
index c84471ad..7437595a 100644
--- a/public/js/2dtilt.js
+++ b/public/js/2dtilt.js
@@ -1 +1 @@
-"use strict";var centerX,centerY,mouseX,mouseY,target=document.getElementsByClassName("tilt")[0],content=target.getElementsByClassName("content")[0],isMouseOver=!1;function resetStyle(){target.style.transform="",target.style.height="0px"}function tiltEffect(){isMouseOver=!0;var rect=target.getBoundingClientRect();centerX=rect.left+rect.width/2,centerY=rect.top+rect.height/2,target.style.transform="translate(".concat((mouseX-centerX)/50,"px, ").concat((mouseY-centerY)/50,"px)"),requestAnimationFrame(tiltEffect)}navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)||1<window.orientation||(target.addEventListener("mouseleave",function(){isMouseOver=!1,target.style.transform=""}),document.addEventListener("mousemove",function(event){mouseX=event.clientX,mouseY=event.clientY}),requestAnimationFrame(tiltEffect)); \ No newline at end of file
+"use strict";var target=document.querySelectorAll(".tilt")[0];try{var tiltFullPageListening=target.dataset.tiltFullPageListening}catch(TypeError){var tiltFullPageListening}var centerX,centerY,mouseX,mouseY,isMouseOver=!1;function resetStyle(){target.style.transform="",target.style.height="0px"}function tiltEffect(){isMouseOver=!0;var rect=target.getBoundingClientRect();centerX=rect.left+rect.width/2,centerY=rect.top+rect.height/2,target.style.transform="translate(".concat((mouseX-centerX)/50,"px, ").concat((mouseY-centerY)/50,"px)"),requestAnimationFrame(tiltEffect)}navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)||1<window.orientation||(target.addEventListener("mouseleave",function(){isMouseOver=!1,target.style.transform=""}),tiltFullPageListening===void 0?target.addEventListener("mousemove",function(event){mouseX=event.clientX,mouseY=event.clientY}):document.addEventListener("mousemove",function(event){mouseX=event.clientX,mouseY=event.clientY}),requestAnimationFrame(tiltEffect)); \ No newline at end of file