<script>
function play(){
var audio = document.getElementById("audio");
audio.play();
}
</script>
<a id="w00t" title="Facebook" target="_blank">
<img src="https://d2fi4ri5dhpqd1.cloudfront.net/public/resources/social-networks-icon-sets/circle-dark-gray/facebook.png" alt="Facebook" title="Facebook" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important"onclick="play()">
</a>
<audio id="audio" src="http://www.mashuptown.com/files/dj_morgoth_never_gonna_give_your_teen_spirit_up.mp3"type="audio/mp3"> ></audio>
Hey Guys,
Thank you very much for your answers! It helped me a step further and to find some solutions to solve my problem. As of now, I have the following code. This basically does what I want it to do and intent to do. Playing audio when you click on a picture rather than a button.
However, I'm not really satisfied that it doesn't show the finger icon when you hover over the Facebook icon. I tried to solve this with href, but I cant get it done without that it opens a new separate error tab/window with: {"error": "Please use POST request"}
Do you guys have any thoughts how to solve this? Thanks!