Skip to content

♫ A simple tiny Javascript library to add interaction sounds to your website.

Notifications You must be signed in to change notification settings

JavaScriptCodes/loud-links

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Loud Links

The library creates HTML5 audio element and uses it to play mp3/ogg audio files which is currently supported in all browsers.

Usage

It’s super simple, attach the library to your project and follow these 3 steps:

Step 1

At the root of your website directory create a folder named “sounds” with 2 more folders inside it with the names “mp3” & “ogg”.

sound folders


Step 2

Add the class “loud-link-hover” to any link/element that you want to give a sound on hover.

<div class=“loud-link-hover”></div>

Or add the class “loud-link-click” to any link/element that you want to give a sound on click.

<div class=“loud-link-click”></div>

Step 3

Add the attribute data-src” to the element & write in it the name of your sound without the extension.

<div class=“loud-link-hover” data-src=“sound”></div>

Done & Done

About

♫ A simple tiny Javascript library to add interaction sounds to your website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%