How can I open an image in a new window by using its id?
id
function swipe() { var largeImage = document.getElementById(\'largeImage\');
Try with the following function:
function newTabImage() { var image = new Image(); image.src = $('#idimage').attr('src'); var w = window.open("",'_blank'); w.document.write(image.outerHTML); w.document.close(); }
Call with this HTML code: