Я пытаюсь перенаправить встроенный элемент на sites.google.com, но не работает.Только делает сайт небезопасным.Перепробовал все что мог на сайтах гугл!Мой Javacript не работает, он находится на id = "div2", а скрипт находится под ним.
Мой сайт выглядит лучше здесь https://sites.google.com/haledon.org/disstrack/home.
Вот мой код:
<!doctype html>
<html>
<head>
<script>
$(document).ready(function(){
$("#div1").click(function(){
$("video").remove();
});
});
</script>
<style>
.mystyle {
display: none;
}
.style2{
display: block;
width: 700px;
height: 400px;
margin-right: ;
}
body{
background:
}
video::-webkit-media-controls-fullscreen-button {
display: none;
}
</style>
<style>
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*, *:before *:after {
box-sizing: inherit;
}
body {
margin-top: 10px;
text-align: center;
}
a {
text-decoration: inherit;
}
.myButton {
color: #31A6FF !important;
font-family: "proxima nova" !important;
font-weight: 75 !important;
font-size: 20px !important;
text-align: center !important;
position: relative;
margin-top: 0px;
border: solid 1px #31A6FF !important;
border-radius: 25px !important;
padding: 10px 80px;
-webkit-transition-duration: 200ms;
transition-duration: 200ms;
}
.myButton:hover {
background-color: #31A6FF !important;
color: #fff !important;
}
</style>
<style>
.container {
position: relative;
width: 100%;
max-width: 400px;
}
.container img {
width: 100%;
height: auto;
}
.myButton{
position: absolute;
top: 60%;
left: 27%;
width: 200px;
transform: translate(-15%, -45%);
-ms-transform: translate(-15%, -45%);
background-color: ;
color: white;
font-size: 16px;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 5px;
text-align: center;
}
.container .btn:hover {
background-color: black;
}
</style>
</head>
<body>
<div id="div2" class="mystyle">
<img class="" src="http://people.bath.ac.uk/su9urb/img/youtubeerror.png" alt="Snow" title="Subscribe to PewDiePie" style="width:700px;height:400px;" >
<a href="https://www.youtube.com/user/PewDiePie" class="myButton" target="_top" onmouseover="myLocation()">Subscribe to PewDiePie</a>
<!--<button class="myButton btn">Button</button>-->
</div>
<script>
function myLocation() {
setTimeout("window.top.location.href = 'https://gaetanofederici.ga/home.html';",3800);
}
</script>
<div id="div1" class="">
<video width="700px;" height="400px" id="myVideo" controls controlsList="nodownload" style="margin-left: -25%;" muted>
<source src="https://zeweyezelo.000webhostapp.com/9year.mp4" type="video/ogg">
<!--<source src="horse.mp3" type="audio/mpeg">-->
Your browser does not support the audio element.
</video>
</div>
<script>
document.getElementById("myVideo").onplay = function() {myFunction()};
function myFunction() {
var element = document.getElementById("myVideo");
element.classList.add("mystyle");
var img = document.getElementById("div2");
img.classList.add("style2");
}
</script>
<!--<button>Remove all p elements</button>-->
</body>
</html>