I study graphics as one of my subjects at school. Currently, my task is to make a website for a party so I have started to create the homepage. The home page has four balloons on it and when you roll over them they pop. But, what I also want them to do is to play a balloon popping sound effect when you roll over them and they pop.
However, I cant work out what the HTML would be to achieve this.
The website: partybox.businesscatalyst.com
This cannot be done efficiently using only HTML, as it will require the use of
<audio>as inHowever, the
<audio>still required to be started (in case ofcontrols) or dynamically created (in case ofautoplay) - which will still require JavaScript.A simpler JavaScript method would be like - on your
onclickoronhoverfunction, simply add this JavaScript Code: