gpt4 book ai didi

javascript - jQuery 不适用于我的 HTML

转载 作者:行者123 更新时间:2023-12-01 02:30:02 24 4
gpt4 key购买 nike

我不太清楚为什么它不起作用。我从 Google 服务器获取了 jQuery,但它无法识别我的 fadeOut。

这是我的 html 文件

<!DOCTYPE html>
<html>
<title>Prepare your Jimmies</title>
<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script type='text/javascript' src='script.js'></script>
<body>
<div id="loading">
<p id="rj">Shh... No tears, Only Dreams Now</p>
</div>
</body>
</html>

这是 script.js 文件

// JavaScript Document
$(document).ready(function() {
$('#rj').fadeOut(100,'slow');
});

如有任何帮助,我们将不胜感激。谢谢

最佳答案

我认为fadeOut需要两个参数,一个超时和一个回调。所以应该是:

// JavaScript Document
$(document).ready(function() {
$('#rj').fadeOut('slow');
});

// JavaScript Document
$(document).ready(function() {
$('#rj').fadeOut(100);
});

http://api.jquery.com/fadeOut/

关于javascript - jQuery 不适用于我的 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20762916/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com