Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

open image in browser fit to screen with window.open

$(".view-full-size").click(function() {

  var mainScreenshot = $("#main-screenshot");
	
  var theImage = new Image();
  theImage.src = mainScreenshot.attr("src");
	
  var winWidth = theImage.width + 20;
  var winHeight = theImage.height + 20;
	
  window.open(this.href,  null, 'height=' + winHeight + ', width=' + winWidth + ', toolbar=0, location=0, status=0, scrollbars=0, resizable=0'); 
	
  return false;
	
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: dynamic select paragraph id using javascript 
Javascript :: firebase remove not valid token 
Javascript :: scrollspyNav react 
Javascript :: foreach access this 
Javascript :: guardar en una variable la peticion ajax 
Javascript :: ja display snippet from text 
Javascript :: set drawingmode javascript 
Javascript :: mongodb js get id of inserted 
Javascript :: json2csv parse with flatten example javascript 
Javascript :: Trouble setting up sample table. “Could not find matching row model for rowModelType clientSide” 
Javascript :: get the first value when mapping through the array 
Javascript :: get every other item in an array 
Javascript :: compare string camelcase and lowercase javascript 
Javascript :: apache log format json 
Javascript :: eslint globals "_" true lodash 
Javascript :: discord js get badge user 
Javascript :: int cating javascript 
Javascript :: angular http call caching issue even after no-cache 
Javascript :: bbcode javascript html textarea 
Javascript :: defer accessing a variable until available in js 
Javascript :: how to change the model object django in javascript 
Javascript :: send json object to xsjs 
Javascript :: react.common.JavascriptException: Error: invalid host 
Javascript :: angular.json to war 
Javascript :: get selected value on componentdidmount reactjs 
Javascript :: kendo treeview get element 
Javascript :: riverSizes javascript 
Javascript :: js code to run hello world 
Javascript :: what does l do in javascript 
Javascript :: fixed nodeport 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =