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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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});