页面在fadeOut之后移动

时间:2014-09-17 02:48:34

标签: javascript jquery html

我是jQuery编程的新手,想要在淡入效果后解决页面更改。 我听说使用回调方法。但不知道如何使用请给我一些建议! " Scene2.html"是我想要移动的地方。

enter code here
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function(){
$("#first").fadeOut(1500);
});

</script>

</head>
<body>
<img id="first" src="images/Logop.jpg"/>  
</body>
</html>

1 个答案:

答案 0 :(得分:0)

你这样做:

&#13;
&#13;
jQuery(function(){
$("#first").fadeOut(1500, function() {
	window.location.href = 'Scene2.html';
  });
});
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<img id="first" src="http://cdn.hark.com/images/000/003/249/3249/original.jpg">
&#13;
&#13;
&#13;

相关问题