以下のコードをサイトに追加しようとするたび<a href>
に、ページ上のすべてのリンクが開きます。すべてのリンクを開かずにこのコードを機能させるにはどうすればよい<a href>
ですか? また、クリック機能に使用する代わりに、ボタンとその ID を使用できますか?
<!DOCTYPE html>
<html>
<head>
<style>
p.one { position:relative; width:400px; height:90px; }
div.two { position:absolute; width:400px; height:65px;
font-size:36px; text-align:center;
color:yellow; background:red;
padding-top:25px;
top:0; left:0; display:none; }
span.three { display:none; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<p class="one">
Let it be known that the party of the first part
and the party of the second part are henceforth
and hereto directed to assess the allegations
for factual correctness... (<a href="#">click!</a>)
<div class="two"><span class="three">Click here to continue...</span></div>
</p>
<script>
$("a").click(function () {
$("div").fadeIn(3000, function () {
$("span").fadeIn(100);
});
return false;
});
</script>
</body>
</html>