Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #736815

    Hi,

    I’m struggling on a very simple function. I’m using the Enfold theme. On my site I want to add a picture and if you click on that picture a sound file (mp3) shall be played. And if you hover over the picture the cursor changes so the user recognizes that he can click on that image. With HTML I would use the following code
    <audio id="audio-id" src="my.mp3" preload="auto"></audio><img src="my.jpg" onclick="document.getElementById('audio-id').play()" style="cursor:pointer;" />

    I already tried to use the Text Block and also the Code Block but that didn’t work. It seems as the onclick function disappears or doesn’t work.
    Is there a simple way to create the desired function with Enfold options?

    Thanks in advance

    • This topic was modified 7 years, 10 months ago by stuetzel.
    #736825

    Hey Sven!

    You should either create a shortcode ( so the HTML could work properly inside WordPress ), or you can try add a sidebar and use the Text Widget when you call that sidebar.

    Let us know if we can help you with anything else.

    Cheers!
    Basilis

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