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
|
||||
---
|
||||
<script>
|
||||
function loadMainVideo(e) {
|
||||
function loadMainVideo() {
|
||||
var p = document.getElementById('mainvideo'),
|
||||
t = p.getElementsByTagName('DIV')[0],
|
||||
nd = document.createElement('IFRAME');
|
||||
|
@ -15,12 +15,11 @@ nd.setAttribute('frameborder', 0);
|
|||
nd.setAttribute('allowfullscreen', true);
|
||||
t.innerHTML = '';
|
||||
t.appendChild(nd);
|
||||
removeEvent(p, loadMainVideo);
|
||||
cancelEvent(e);
|
||||
p.onclick = '';
|
||||
}
|
||||
</script>
|
||||
<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">
|
||||
<div class="mainvideoicon"></div>
|
||||
<div class="mainvideoiconhover"></div>
|
||||
|
|
|
@ -8,7 +8,7 @@ id: index
|
|||
title: Bitcoin
|
||||
---
|
||||
<script>
|
||||
function loadMainVideo(e) {
|
||||
function loadMainVideo() {
|
||||
var p = document.getElementById('mainvideo'),
|
||||
t = p.getElementsByTagName('DIV')[0],
|
||||
nd = document.createElement('IFRAME');
|
||||
|
@ -17,12 +17,11 @@ nd.setAttribute('frameborder', 0);
|
|||
nd.setAttribute('allowfullscreen', true);
|
||||
t.innerHTML = '';
|
||||
t.appendChild(nd);
|
||||
removeEvent(p, loadMainVideo);
|
||||
cancelEvent(e);
|
||||
p.onclick = '';
|
||||
}
|
||||
</script>
|
||||
<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">
|
||||
<div class="mainvideoicon"></div>
|
||||
<div class="mainvideoiconhover"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue