<script type="text/javascript">
$(document).ready(function(){
$("#click").click(function () {
$("#info").slideToggle('slow');
});
});
</script>
这是html代码
<h4 class="rsvpTitle">
<a href="#" id="click" class= "blockExpand"> <span class="arrow"></span>RSVP</a>
</h4>
<div id="info" class="expandContent">
<form id="formmail method="post" action="form_handler.php">
<label class="response" for="response">Will you be joining us?</label><br>
<span style="margin-left:121px;">
<input type="radio" name="response" value="I'll be there with bells on!" id="response">I'll be there with bells on!</span>
<br>
我有这个用于切换效果的代码。但是,切换不会保持关闭状态,我希望切换保持关闭,直到有人单击按钮以释放切换。有任何想法吗?代码写得好吗?