Streaming live at 10am (PST)

Modal Video Won't Stop Playing


I have a website in development…

On the homepage is a button called ‘Why Use Us?’ On click it opens a modal that has a youtube embedded video inside it. On clicking play and after closing the modal down, the video continues to play.

Does anyone know how I can stop the video playing on modal close? The modal script is as follows…

('.video-modal').click(function() { (’.video-modal-background’).fadeIn();
('.close-modal').click(function() { (’.video-modal-background’).fadeOut();

Many thanks for any help.

Hi @Golden28,

How comes you didn’t opt to use the lightbox link with video embed?

Your problem will be solved doing it this way and no need for coding.



Hey @nwdsha

That has worked perfectly! I totally forgot about the video embed lightbox feature.

Excellent advice. Thanks a lot.

1 Like

You’re very welcome @Golden28

I’m glad it worked out well for you :raised_hands: It certainly beats WP, installing several plugins to achieve one simple function.