Sound effect
General Discussion
5
Posts
2
Posters
692
Views
2
Watching
-
<script> var mysound = new Audio('http://localhost:10020/wp-content/uploads/2025/03/mixkit-fast-double-click-on-mouse-275.wav'); jQuery(document).on('mouseup', 'a[data-expand]', function(){ mysound.play(); }) </script>Enter this css in "lay options" -> "custom css & html" -> "custom head content"
for the url part, get the right URL like this:

upload a short sound to media library, click on the file, you get the file url:

for me, its:
http://localhost:10020/wp-content/uploads/2025/03/mixkit-fast-double-click-on-mouse-275.wav
i got this file from here:

-
not sure! maybe put audio element inside the page html
<audio style="display:none;" preload="auto" src="http://localhost:10020/wp-content/uploads/2025/03/mixkit-fast-double-click-on-mouse-275.wav"></audio>Enter this html in "lay options" -> "custom css & html" -> "custom html at bottom"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
most browsers and mobile devices only play sounds once you have interacted/tapped on the website at least once
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com