if(element.requestFullscreen){ element.requestFullscreen(); } else if (element.webkitRequestFullscreen){ element.webkitRequestFullscreen(); } else if (element.mozRequestFullScreen){ element.mozRequestFullScreen(); } else if (element.msRequestFullscreen){ element.msRequestFullscreen(); }else { $(".popup-overlay, .popup-content").removeClass("active"); } }); $(".close").on("click", function() { $(".popup-overlay, .popup-content").removeClass("active"); $(element).trigger('pause'); }); -->