Jquery 添加时间延迟以设置动画并重定向到下一个图像
我使用animate.css制作动画Jquery 添加时间延迟以设置动画并重定向到下一个图像,jquery,css,css-animations,animate.css,Jquery,Css,Css Animations,Animate.css,我使用animate.css制作动画 如何添加时间延迟,使其动画持续几毫秒,并缓慢重定向到下一页 <div class="row-fluid" id="animatetransport"> <div id="industry" class="leftbg col-sm-6 col-xs-6" style="height: 100%"> <div class="imgwrapperleft">
如何添加时间延迟,使其动画持续几毫秒,并缓慢重定向到下一页
<div class="row-fluid" id="animatetransport">
<div id="industry" class="leftbg col-sm-6 col-xs-6" style="height: 100%">
<div class="imgwrapperleft">
<h1 id="industry" class="text-center">INDUSTRY</h1>
<!--<a href="industry/index.html"> <img src="images/factory.png" class="img-responsive"></a>-->
</div>
</div>
<img src="images/logo.png" class="logo">
<div class="rightbg col-sm-6 col-xs-6" style="height: 100%; ">
<div class="imgwrapperright">
<h1 id="transport" class="text-center">TRANSPORTATION</h1>
<!--<a href="industry/index.html"><img src="images/excavator.png" class="img-responsive"></a>-->
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#transport").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" ).delay( 8000 );
window.location.href = "industry/index.html";
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#industry").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" );
window.location.href = "industry/index.html";
});
});
</script>
工业
运输
$(文档).ready(函数(){
$(“#传输”)。单击(函数(){
/*警告(“该段落被点击”)*/
$('animatetransport').addClass(“动画幻灯片左”).delay(8000);
window.location.href=“industry/index.html”;
});
});
$(文档).ready(函数(){
$(“#行业”)。单击(函数(){
/*警告(“该段落被点击”)*/
$('#animatetransport').addClass(“动画幻灯片左”);
window.location.href=“industry/index.html”;
});
});
如果将window.location.href
更改为setTimeout,它将延迟指定的毫秒数
setTimeout(function(){window.location.href=“industry/index.html”},500)
如果将window.location.href
更改为setTimeout,它将延迟指定的毫秒数
setTimeout(function(){window.location.href=“industry/index.html”},500)代码>为此,请使用setTimeout
$('#animatetransport').addClass( "animated slideInLeft" );
setTimeout(function() {
window.location.href = "industry/index.html";
}, 8000);
为此,请使用setTimeout
$('#animatetransport').addClass( "animated slideInLeft" );
setTimeout(function() {
window.location.href = "industry/index.html";
}, 8000);
很乐意帮忙:)很乐意帮忙:)