Golden28
(Neil Newnham)
August 9, 2017, 6:44pm
1
Hi,
I have a website in development…
http://highclickrate.fountaindigital.co.uk/
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.
nwdsha
(Naweed)
August 9, 2017, 10:29pm
2
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.
Best,
Naweed
2 Likes
Golden28
(Neil Newnham)
August 10, 2017, 7:54am
3
Hey @nwdsha
That has worked perfectly! I totally forgot about the video embed lightbox feature.
Excellent advice. Thanks a lot.
1 Like
nwdsha
(Naweed)
August 11, 2017, 9:20pm
4
You’re very welcome @Golden28
I’m glad it worked out well for you It certainly beats WP, installing several plugins to achieve one simple function.