能有人帮我加我的一些代码一些代码,我 在这里工作是我需要的..变化的div风格
我的全部代码是在这里http://jsfiddle.net/2urmku1h/
在这里,我需要改变
<div style="display:none;">Change style of this div to Block fro js above</div>
,这里是我的一些JS代码,在头节我需要一些如何工作
function startChecking() {
secondsleft -= 1e3;
document.querySelector(".load_video").innerHTML = "Please Wait.. " + Math.abs(secondsleft/1e3) + " Seconds";
if (secondsleft == 0) {
clearInterval(interval);
document.querySelector(".load_video").style.display = "none";
document.querySelector(".frame_src").style.display = "";
document.querySelector(".frame_src").src = document.querySelector(".frame_src").getAttribute("data-src")
}
}
function startschedule() {
clearInterval(interval);
secondsleft = threshold;
document.querySelector(".load_video").innerHTML = "Please Wait.. " + Math.abs(secondsleft/1e3) + " Seconds";
interval = setInterval(function() {
startChecking()
}, 1e3)
}
function resetTimer() {
startschedule()
}
var timeout, interval;
var threshold = 1e4;
var secondsleft = threshold;
window.onload = function() {
startschedule()
}
我需要的是,如果我的视频链接,点击它会停止倒计时无论剩下5秒什么都,它就会停止倒计时,hiide这个div <div class="load_video"></div>
,并显示iframe中。但我想它,当我点击其中一个按钮,它确实隐藏load_video div和显示iframe,但我想它也改变这个div的格式<div style="display:none;">Change style of this div to Block fro js above</div>
显示来阻止。
希望你们明白
http://api.jquery.com/show/ – Neilos