When an image on a web-page is right-clicked a menu appears which provides the ability to "Save Image As". Is it possible to get this functionality through jQuery or JavaScript by clicking on a button (div).
I've tried to get code from numerable sites without success.
The following is a simple test page where clicking on the red button would show the menu.
Thanks,
<!DOCTYPE HTML>
<html>
<head>
<title>Test</title>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0"/>
<script src='jquery-2.1.4.js'></script>
<style>
#divBtn{
width: 100px;
height: 50px;
top: 0px;
left: 0px;
background-color: #ff0000;
position: absolute;
}
#divImage {
width: 864px;
height: 541px;
top: 50px;
left: 0px;
position: absolute;
}
</style>
</head>
<body>
<a href="Imager.jpg" download="ImageCopy.jpg"><div id="divBtn"></div>Click</div></a>
<div id="divImage">
<img src='Imager.jpg'></img>
</div>
<script>
$(document).ready(function(){
//Code to show menu when divBtn is clicked.
});
</script>
</body>
</html>