Last active
January 20, 2016 12:37
-
-
Save caspahouzer/8371d4d98320e6f11ede to your computer and use it in GitHub Desktop.
enable zoom
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
$(document).ready(function() { | |
var zoomed = false; | |
$( "#container" ).dblclick(function() { | |
if(zoomed === false){ | |
$("body").css('transition', ''); | |
$("body").css('zoom', 2); | |
$("body").css('-moz-transform', 'scale(2)'); | |
$("body").css('-ms-transform', 'scale(2)'); | |
zoomed = true; | |
}else{ | |
$("body").css('transition', 'all 1s ease'); | |
$("body").css('zoom', 1); | |
$("body").css('-moz-transform', 'scale(1)'); | |
$("body").css('-ms-transform', 'scale(1)'); | |
zoomed = false; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment