I have several images like this:
<img id="geqfader" frequency="100" src="img/fader.png" />
<img id="geqfader" frequency="400" src="img/fader.png" />
<img id="geqfader" frequency="1600" src="img/fader.png" />
<img id="geqfader" frequency="6300" src="img/fader.png" />
When the user clicks on an image, I want to invoke a function and pass on the value of frequency
:
document.getElementById('geqfader').addEventListener('click', function() {
showResult(hereIWantTheFrequencyValue, toneFrequency)
});
How can I pass the image frequency
value into showResult
(where hereIWantTheFrequencyValue
is)?