mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Properly remove event from landing page DOM object
This commit is contained in:
parent
7013b784f3
commit
17886b6564
2 changed files with 6 additions and 8 deletions
|
@ -6,7 +6,7 @@ layout: base
|
||||||
id: index
|
id: index
|
||||||
---
|
---
|
||||||
<script>
|
<script>
|
||||||
function loadMainVideo(e) {
|
function loadMainVideo() {
|
||||||
var p = document.getElementById('mainvideo'),
|
var p = document.getElementById('mainvideo'),
|
||||||
t = p.getElementsByTagName('DIV')[0],
|
t = p.getElementsByTagName('DIV')[0],
|
||||||
nd = document.createElement('IFRAME');
|
nd = document.createElement('IFRAME');
|
||||||
|
@ -15,12 +15,11 @@ nd.setAttribute('frameborder', 0);
|
||||||
nd.setAttribute('allowfullscreen', true);
|
nd.setAttribute('allowfullscreen', true);
|
||||||
t.innerHTML = '';
|
t.innerHTML = '';
|
||||||
t.appendChild(nd);
|
t.appendChild(nd);
|
||||||
removeEvent(p, loadMainVideo);
|
p.onclick = '';
|
||||||
cancelEvent(e);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<p class="mainsummary">{% translate listintro %}</p>
|
<p class="mainsummary">{% translate listintro %}</p>
|
||||||
<div class="mainvideo" id="mainvideo" onclick="loadMainVideo(event);"><div>
|
<div class="mainvideo" id="mainvideo" onclick="loadMainVideo();"><div>
|
||||||
<img src="/img/video/video_wuc.jpg" alt="Youtube video">
|
<img src="/img/video/video_wuc.jpg" alt="Youtube video">
|
||||||
<div class="mainvideoicon"></div>
|
<div class="mainvideoicon"></div>
|
||||||
<div class="mainvideoiconhover"></div>
|
<div class="mainvideoiconhover"></div>
|
||||||
|
|
|
@ -8,7 +8,7 @@ id: index
|
||||||
title: Bitcoin
|
title: Bitcoin
|
||||||
---
|
---
|
||||||
<script>
|
<script>
|
||||||
function loadMainVideo(e) {
|
function loadMainVideo() {
|
||||||
var p = document.getElementById('mainvideo'),
|
var p = document.getElementById('mainvideo'),
|
||||||
t = p.getElementsByTagName('DIV')[0],
|
t = p.getElementsByTagName('DIV')[0],
|
||||||
nd = document.createElement('IFRAME');
|
nd = document.createElement('IFRAME');
|
||||||
|
@ -17,12 +17,11 @@ nd.setAttribute('frameborder', 0);
|
||||||
nd.setAttribute('allowfullscreen', true);
|
nd.setAttribute('allowfullscreen', true);
|
||||||
t.innerHTML = '';
|
t.innerHTML = '';
|
||||||
t.appendChild(nd);
|
t.appendChild(nd);
|
||||||
removeEvent(p, loadMainVideo);
|
p.onclick = '';
|
||||||
cancelEvent(e);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<p class="mainsummary">{% translate listintro %}</p>
|
<p class="mainsummary">{% translate listintro %}</p>
|
||||||
<div class="mainvideo" id="mainvideo" onclick="loadMainVideo(event);"><div>
|
<div class="mainvideo" id="mainvideo" onclick="loadMainVideo();"><div>
|
||||||
<img src="/img/video/video_wuc.jpg" alt="Youtube video">
|
<img src="/img/video/video_wuc.jpg" alt="Youtube video">
|
||||||
<div class="mainvideoicon"></div>
|
<div class="mainvideoicon"></div>
|
||||||
<div class="mainvideoiconhover"></div>
|
<div class="mainvideoiconhover"></div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue