open image in browser fit to screen with window open

Solutions on MaxInterview for open image in browser fit to screen with window open by the best coders in the world

showing results for - "open image in browser fit to screen with window open"
Garnet
29 Feb 2020
1$(".view-full-size").click(function() {
2
3  var mainScreenshot = $("#main-screenshot");
4	
5  var theImage = new Image();
6  theImage.src = mainScreenshot.attr("src");
7	
8  var winWidth = theImage.width + 20;
9  var winHeight = theImage.height + 20;
10	
11  window.open(this.href,  null, 'height=' + winHeight + ', width=' + winWidth + ', toolbar=0, location=0, status=0, scrollbars=0, resizable=0'); 
12	
13  return false;
14	
15});