-
-
Save nocodesupplyco/51faaa477988ca6ce79f3e728078aa05 to your computer and use it in GitHub Desktop.
Pause/Reset Video Embed on Click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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