stop the video while close popup window

while i click on open video button one popup window will display . but after closing that popup window video sound playing contentiously i want to stop that video at the time of closing popup window .


<!DOCTYPE html>
<html lang="en">
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>

<script type="text/javascript">
$(function () {

$('.push').click(function () {

type: 'post',
url: 'video_pop.html',
success: function (r) {
$(document).ready(function () {
var closevideobutton = '.hidevideo';
$(closevideobutton).click(function () {
$('#details_supp').find('iframe').attr('src', '');
<div class="container">
<button type="button" id="" class="push" data-toggle="modal" data-target="#myModal">Open Video</button>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close x" data-dismiss="modal">×</button>
<h4 class="modal-title">Evelution Of Investing</h4>
<div id="details_supp" class="modal-body" style="display: none;">
<div class="modal-footer">
<button type="button x" class="btn btn-default" data-dismiss="modal">Close</button>


<iframe id="video" width="420" height="315" src="//" frameborder="0" allowfullscreen></iframe>


It looks like a typo :

$(closevideobutton) doesn't point to anything.

You may want to change

var closevideobutton = '.hidevideo';


var closevideobutton = '.btn-default, .close';

plunkr (I removed the ajax because of a problem with plunkr)