関数が onmousedown イベントを使用して呼び出されることになっているときに、トランジションへのリンクを作成しましたが、未定義の関数がキャッチされません。明らかに私の機能は定義されています。私はまだコードを学んでいるので、私が見たり理解したりできないのは何ですか。どんなヒントでも大歓迎です。
<html>
<head>
<script type="text/javascript"src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="javascript">
$(document).ready(function (){
var url = "phpajaxtut.php";
});
function swapContent(cv){
$("#myDiv").html("animated gif goes here").show();
.post(url, {contentVar:cv}, function(data){
$("#myDiv").html(data).show();
});
}
</script>
<a href="#" onClick="return false" onmousedown="swapContent('con1')">Click the text</a>
<a href="#" onClick="return false" onmousedown="swapContent('con2');">Click the text</a>
<a href="#" onClick="return false" onmousedown="swapContent('con3');">Click the text</a>
</head>
<body >
<div id ="myDiv">My default content</div>
</body>
</html>