Hello,
I have a page on my website that is using HTML5 audio controls.
By default the audio files overlap if more than one is played. (HTML5 audio issue)
The solution is to use a javascript to control the files. So on this same page
I am using a javascript to handle the controls so the audio files do not overlap when played.
How can I add the javascript and get it work on that single page?
any moderators on for assistance? Thanks
I have tried using all the plugins to embed javascript into the header or footer and into single pages and none of them seem to work. I have also tried to hard code the script into the page source with the built in editors and that does not work. I am not sure what im doing wrong. Any help is appreciated.
Thanks
I could not get the java script to work so I ended up getting rid of the java code entirely and used a plugin without script to achieve the desired results.
You can close this ticket now.
Thanks for assistance
Hey,
Glad you figured it out!
For future reference and readers, you can refer to this post – https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-footer-section and use the code as following to target specific page using ID
//-------------------------------
// Custom script in footer
//-------------------------------
function custom_script_name(){
if(is_page( 3739 )){
?>
<script>
// Your script here
</script>
<?php
}}
add_action('wp_footer', 'custom_script_name');
Best regards,
Yigit