1

So i have this image that styled with Pointer-events:none, with a iframe beneath it. I've lined the iframe up with my own play button (the img with the Pointer-events:none) so when you click it a song is played. What i want to do is having the play icon change to a Pause icon. The problem is when the iframe (spotify) doesn't work with onclick so i cant call a toggle function. Is it posible to have another div or something like it between the image and the that also have pointer-events:none but can call a javascript function?

Hazelcraft
  • 113
  • 8
  • Looks like it might be possible: https://stackoverflow.com/a/37403915/4573410 – Jon Uleis Aug 23 '17 at 20:36
  • The problem is that you can't transfer a click through a div (which is capturing the click event) down into the iframe. – Robert Moore Aug 23 '17 at 21:04
  • I know that onclick on a div is not the way to go but with jQuery there could be a chance. The problem with that link is that they dont use pointer-events:none. Without it i dont think i can press the button to start the iframe :/! – Hazelcraft Aug 23 '17 at 22:11

0 Answers0