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
.mfp-fade.mfp-bg { | |
opacity: 0; | |
background: #000; | |
transition: all .3s; | |
} | |
.mfp-fade.mfp-bg.mfp-ready { opacity: .9; } | |
.mfp-fade.mfp-bg.mfp-removing { opacity: 0; } | |
.mfp-fade.mfp-wrap .mfp-content { |
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
var img = $('img'); | |
if(img.length > 0){ | |
var offset = img.offset(); | |
function mouse(event){ | |
var center_x = (offset.left) + (img.width()/2); | |
var center_y = (offset.top) + (img.height()/2); | |
var mouse_x = event.pageX; var mouse_y = event.pageY; | |
var radians = Math.atan2(mouse_x - center_x, mouse_y - center_y); | |
var degree = (radians * (180 / Math.PI) * -1) + 90; | |
img.css('-moz-transform', 'rotate('+degree+'deg)'); |
NewerOlder