当点击一个 div 后,我想让另一个 div 出现。
因此,当点击 '#music' 时,我希望 '#musicinfo' 出现。
以下是 CSS 代码:
#music {
float:left;
height:25px;
margin-left:25px;
margin-top:25px;
margin-right:80px;
font-family: "p22-underground",sans-serif;
font-style: normal;
font-weight: 500;
font-size:13pt;
}
#musicinfo {
width:380px;
margin:25px;
font-family: "p22-underground",sans-serif;
font-style: normal;
font-weight: 500;
font-size:13pt;
line-height:1.1;
display:none;
}
以及jQuery:
<script type="text/javascript">
$("#music").click(function () {
$("#musicinfo").show("slow");
});
</script>
任何帮助都将不胜感激 :)
$(document).ready()
方法中,那么它就会起作用。你遇到了什么问题? - David Thomas