に何もしていない私は結婚式RSVPサイトの次のHTMLを持って、私は建物だ:jQueryのフェードアウト()関数はFF
<!doctype html>
<html>
<head>
<title>Amy and Scott's Wedding - RSVP Page</title>
<link href="http://www.asjwedding.com/style/base.css" rel="stylesheet">
<link href="http://www.asjwedding.com/style/user.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://www.asjwedding.com/script/formControl.js"></script>
</head>
<body>
<div id="doc">
<div id="content">
<div class="text-content">
<h1>Welcome!</h1>
<div class="question">
... omitted for brevity ...
<div id="messageArea" class="response">
</div>
<div class="submitButton">
<input type="submit" value="Submit" onclick="validateForm();">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
そして、私はjQueryのを使用して、以下のjavascriptを持っている:
function hideMessage() {
alert("Fading...");
$("#messageArea").fadeOut();
}
しかし、何らかの理由でフェージングが機能していないため、理由がわかりません。 hideMessage()の中でhide()を実行するとうまくいきますが、fadeOut()を使用しても何も起こりません。 (実際にはそうではありません...私に警告を与えますが、実際にはフェージングはしません)。
LinuxでFirefox Nightly(14.0)を使用していますが、AndroidでNightly Firefoxを使用するとはになります...なぜデスクトップで動作しないのかはわかりません。
誰かが私を助けることができますか?
EDIT:
私が持っている他のJavaScript関数からのいくつかのコード:
function validateForm() {
// Verify at least one of the rsvp options is selected.
if (!$("#radNone").attr("checked") &&
!$("#radWedding").attr("checked") &&
!$("#radReception").attr("checked") &&
!$("#radBoth").attr("checked")) {
sendMessage("Please choose one of the RSVP options.");
return;
}
}
function hideMessage() {
alert("Fading...");
$("#messageArea").fadeOut();
}
function sendNegativeMessage(message) {
$("#messageArea").css('background-color', '#FF6666');
$("#messageArea").html(message);
$("#messageArea").show();
}
function sendMessage(message, type) {
setTimeout(hideMessage, 1000);
$('#messageArea').css('opacity', '1.0');
// Type can be 'positive', 'negative.
if (!type) {
// Assume it's negative.
sendNegativeMessage(message);
}
}
されている必要がありますか? – Wyck
@Wyck、私はそれが違いを生むとは思わない。 –
それはしませんが、彼がどのように呼び出すかを知ることは非常に重要です。 'validateForm()'関数が呼び出されているのが見えますが、 'validateForm()'と 'hideMessage()'関数を呼び出すかどうかは分かりません。 – Ohgodwhy