Hi I am new to the site so I hope this goes well but I have an image and when I click on it I want a function to run to show a but no matter what I try it will not do anything... I am new to JavaScript so I assume something is wrong.
Can anyone help?
This is the JavaScript I am using between the tags!
<script type="text/javascript">
function showLarge() {
var largeFrame = document.getElementById(zoomedIn);
largeFrame.style.visibility='visible';
}
</script>
This is the HTML code:
<div id="zoomedIn" style="visibility:hidden">
<img src="Media//Gallery//img_1.jpg" onclick="showLarge();" alt="Gallery Image 1" />
Perhaps
var largeFrame = document.getElementById("zoomedIn");
would work?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With