Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1161594

    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?

    • This topic was modified 4 years, 11 months ago by LDesp.
    #1161661

    any moderators on for assistance? Thanks

    #1161703

    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

    #1161959

    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

    • This reply was modified 4 years, 11 months ago by LDesp.
    #1161983

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.