Anonymous User 17160716
(@anonymized-17160716)
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.
Anonymous User 17160716
(@anonymized-17160716)
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?
Anonymous User 17160716
(@anonymized-17160716)
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.clicksound
to .container > a
if you don’t want to use an additional class clicksound
for 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?
Anonymous User 17160716
(@anonymized-17160716)
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.
Anonymous User 17160716
(@anonymized-17160716)
barbablu, OK, no problems! You’re welcome 🙂