Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 19, 2022 15:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nocodesupplyco/51faaa477988ca6ce79f3e728078aa05 to your computer and use it in GitHub Desktop.
Pause/Reset Video Embed on Click
// Use or update ".close-video" to class of button that should trigger the stop of videos
$(function(){
$('.close-video').click(function(){
$("iframe").each(function() {
var src= $(this).attr('src');
$(this).attr('src',src);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment