【发布时间】:2014-05-18 09:49:56
【问题描述】:
我的脚本:
$(function () {
$("body").addClass("lost");
var counter = 0;
var time = 400;
var delay = time*5+250;
if($("body").hasClass("lost")) {
$("nav").delay(delay).css({'background': 'transparent'});
$("nav").delay(delay).css({'background-color': '#e30'});
$(this).find(".slogan").delay(delay).html('USB-stick is lost');
var title = "this USB-stick is lost";
} else {
var title = "this USB-stick is not lost";
$(this).find(".slogan").delay(delay).html('USB-stick is not lost');
}
var titleTimerId = setInterval(function(){
document.title = document.title + '.';
counter++;
if(counter == 5){
clearInterval(titleTimerId);
document.title = title;
}
}, time);
});
我想要达到的是,在达到 var 延迟时间之后,所有内容都发生了变化,并且标题发生了变化,我在脚本中的某些元素中放置了这些内容,但这对我不起作用
这代表导航:
<nav onclick="window.location=''">
<img src="//sakesalverda.nl/logo.png" alt="badge html 5" class="logo_nav"/>
<p>sakesalverda.nl</p>
<h1 class="slogan">USB-stick</h1>
</nav>
【问题讨论】:
-
这里有什么导航?是身份证吗?
-
请检查编辑
标签: javascript jquery html title