Details

Blog


Id
2
Title
Let's Make Some Noise
Author
me
Summary
How to add some sound on a button click.
Content
<p>You may find that you want to add some sound to a website. Why? Various reasons. In my case, I needed it for a game.</p> <p>First, add an id to the button in the html.</p> <p><code>&lt;button id="bark-bark"&gt;Bark!&lt;/button&gt;</code></p> <p>Next create some javascript: <br /><img src="../../images/jsButton.png" alt="javascript code" /></p> <p>And that's all you need to do. Click the button and listen to the sound. Bark! Bark!</p> <p><button id="bark-bark" class="btn btn-dark btn-lg">Bark!</button></p>
Image
rowdy3x.jpg
AboutImage
The two dogs in the picture are both rescues. They do enjoy play time and can get quite loud during it!
Edit | Back to List