gotovideo.js 935 B

123456789101112131415161718192021222324252627282930
  1. // $('.btn-close').click(function () {
  2. // $('.youtube-video').each(function () {
  3. // this.contentWindow.postMessage('{"event": "command", "func": "stopVideo", "args": ""}', '*');
  4. // });
  5. // });
  6. // $('.closeplay').click(function () {
  7. // $('.youtube-video').each(function () {
  8. // this.contentWindow.postMessage('{"event": "command", "func": "stopVideo", "args": ""}', '*');
  9. // });
  10. // });
  11. $(document).on("click", ".btn-close", function (event) {
  12. $('.youtube-video').each(function () {
  13. this.contentWindow.postMessage('{"event": "command", "func": "stopVideo", "args": ""}', '*');
  14. });
  15. console.log('stop');
  16. });
  17. $(document).on("click", "#exampleModal", function (event) {
  18. $('.youtube-video').each(function () {
  19. this.contentWindow.postMessage('{"event": "command", "func": "stopVideo", "args": ""}', '*');
  20. });
  21. // alert('111111')
  22. // window.location.reload();
  23. });