<html>
<head>
<script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("#panel h5.head").hover(function(){//鼠標移動事件
$(this).next().show();
},function(){
$(this).next().hide();
})
})
</script>
</head>
<body>
<div id="panel">
<h5 class="head">什么是jQuery?</h5>
<div class="content">
jQuery是繼Prototype之后又一個優秀的JavaScript庫,它是一個由 John Resig 創建于2006年1月的開源項目。jQuery憑借簡潔的語法和
跨平臺的兼容性,極大地簡化了JavaScript開發人員遍歷HTML文檔、操作DOM、處理事件、執行動畫和開發Ajax。它獨特而又優雅的代碼風格改變了
JavaScript程序員的設計思路和編寫程序的方式。
</div>
</div>
</body>
</html>
<html>
<head>
<script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
<style type="text/css">
.highlight{ background:#FF3300; }
</style>
<script type="text/javascript">
$(function(){
$("#panel h5.head").toggle(function(){//鼠標點擊事件
$(this).addClass("highlight");
$(this).next().show();
},function(){
$(this).removeClass("highlight");
$(this).next().hide();
});
})
</script>
</head>
<body>
<div id="panel">
<h5 class="head">什么是jQuery?</h5>
<div class="content">
jQuery是繼Prototype之后又一個優秀的JavaScript庫,它是一個由 John Resig 創建于2006年1月的開源項目。jQuery憑借簡潔的語法和
跨平臺的兼容性,極大地簡化了JavaScript開發人員遍歷HTML文檔、操作DOM、處理事件、執行動畫和開發Ajax。它獨特而又優雅的代碼風格改變了
JavaScript程序員的設計思路和編寫程序的方式。
</div>
</div>
</body>
</html>