使用前先引入jquery
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript"></script>
然後這是一個簡單的判斷式
<script type="text/javascript"> $(function(){ $("h2").css("cursor","pointer").click(function(){ if($(this).next().css("display")=="none") $(this).next().fadeIn("fast") else $(this).next().fadeOut("normal") }); }); </script>
全站熱搜
留言列表