Created
March 29, 2018 10:13
-
-
Save maxcraftsman/5016efdecbc82c5a0b3bf3edc2c64f9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function displayCalc(e){ | |
catetA = document.documentElement.clientWidth; | |
catetB = document.documentElement.clientHeight; | |
gipotenuza = Math.sqrt(Math.pow(catetA,2)+Math.pow(catetB,2)); | |
alpha = Math.asin(catetB/gipotenuza); | |
degrees = alpha * 180 / Math.PI; | |
$("#top-cover, #bottom-cover").css('transform','rotate(-'+ degrees +'deg)'); | |
var all = document.getElementsByTagName("*"); | |
} | |
Pace.on('start',function(){ | |
displayCalc(); | |
$(".pace:before, .pace-progress").css("z-index","99999 !important"); | |
}) | |
Pace.on('done',function(){ | |
$("#top-cover,#bottom-cover").css("transition","all 0.25s ease-in-out"); | |
}) | |
Pace.on('hide',function(){ | |
$("#top-cover").css("bottom","100%"); | |
$("#bottom-cover").css("bottom","-200%"); | |
$(".pace").hide(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment