Beep on link click
-
My customer wants a beep/sound when an user click an article/link on his wordpress website.
I was not able to find a free plugin for that.
Is there a simply way to accomplish that?
-
barbablu, hi there.
HTML:
<audio id="clickaudio"> <source src="https://www.zapsplat.com/wp-content/uploads/2015/sound-effects-55112/zapsplat_multimedia_cell_phone_smart_screen_button_press_click_feedback_003_60932.mp3" type="audio/mpeg"> </audio> <a href="#" id="clicksound">Click me!</a>JavaScript:
document.getElementById("clicksound").addEventListener("click", function () { document.getElementById("clickaudio").play(); });This is just a basic example of how you can accomplish such task. Live demo.
Thank you, but he wants to add a beep on ALL articles (links inside the body of an article are irrilevant).
So when you click a category and then inside the category you choose/click an article, then you have to hear a beep.
Sorry probably I have not been clear.
barbablu, on (on?) all articles? Not sure I understand what do you mean.
So when you click a category and then inside the category you choose/click an article, then you have to hear a beep.
So it’s a link in the categories list? Maybe you can show the website with a block where you want this sound effect?
Thank you M0ze for helping me.
To understand let’s do an example.
Let’s assume “Plugins” https://wordpress.org/plugins/ is a category:
So my customer wants that everytime you click on “Browser Screenshots” or “Contact Form by WPForms – Drag & Drop Form Builder for WordPress” or “Avatar Privacy” …. you have to hear beep.
Where “Browser Screenshots”, “Contact Form by WPForms – Drag & Drop Form Builder for WordPress”, “Avatar Privacy” are WordPress articles.
Is it ok now?
barbablu,
Is it ok now?
Loud and clear 🙂 But here is the thing: I can’t write the solution for your task since I don’t know the HTML structure of your client’s website.
As a sample, check out this demo (you can change the code from
.container > a.clicksoundto.container > aif you don’t want to use an additional classclicksoundfor title anchors inside the category section).His website has been built by Hueman free template.
Is that info enough as HTML structure?I have no chance to solve this problem by a free plugin or css?
barbablu,
Is that info enough as HTML structure?
If you can point me to exact page on dev’s official demo website here: https://demo-hueman.presscustomizr.com/
You are one step from the working code, you just need to decide on the category container name.
I have no chance to solve this problem by a free plugin or css?
CSS? Nope, for sure. Plugin? Never saw something like this and for free, only this one (premium, $14).
Thank you M0ze, after reading this post my customer decided to give up and asked me to insert a button that play a sound on some articles.
Fortunatly already do it.Thanks again.
barbablu, OK, no problems! You’re welcome 🙂
The topic ‘Beep on link click’ is closed to new replies.