Skip to content

Instantly share code, notes, and snippets.

@caspahouzer
Last active January 20, 2016 12:37
Show Gist options
  • Save caspahouzer/8371d4d98320e6f11ede to your computer and use it in GitHub Desktop.
Save caspahouzer/8371d4d98320e6f11ede to your computer and use it in GitHub Desktop.
enable zoom
$(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