以下jQuery代碼有什麼問題?jQuery切換和動畫不起作用
<script type="text/javascript">
$("#contact_min").click(function(){
$("#contact_min").toggle(function(){
$("#contact_min").animate({
height: "300px"
}, 1500);
$(".arrow").html("▼")}
function(){
$("#contact_min").animate({height: "28px"}, 1500);
$(".arrow").html("▲")
})});
</script>
當我點擊contact_min div時,它什麼都不做。
HTML:
<div id="contact_min">
<span class="arrow">▲</span>
<span class="text">foobar</span>
</div>
請發表您的HTML – Swarne27
嘿,我建議你看看[jQuery的文檔(http://docs.jquery.com/),一切都在說明那裏。 –
不需要那 – Vogel612