Here is another example of code with toggle, that does not work. the thing is that it has to hide/show the form below the block "formHide", changing the text in it the block, but insted with method .toggle() written to code the block just hides on the reload not giving to toggle itself.
<!DOCTYPE HTML>
<head>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<meta charset="UTF-8"/>
<title>Email input page</title>
<link href="css/styles.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" >
$('#formHide').toggle(function(){
$('#my_form').fadeOut(10000);
$(this).text('expand form');
}, function() {
$('#my_form').fadeIn(5000);
$(this).text('colapse form');
});
</script>
</head>
<body>
<div id="formHide">colapse form</div>
<form action="form.php" id="my_form">
<div id="bigform">
<fieldset>
<div id="div_form_ 1">
<fieldset id="innerfieldset">
<legend>addition options</legend>
<p><strong>You need?</strong></p>
<div id="format">
<input type="checkbox" value="sh" name="dop_oprions" id="shlem" />
<label for="shlem">Helm</label>
<input type="checkbox" value="bag" name="dop_oprions" id="bag" />
<label for="bag">Backpack</label>
<input type="checkbox" value="od" name="dop_oprions" id="od" />
<label for="od">Wear</label>
</div>
<p><strong>insurance</strong></p>
<div id="radio">
<input type="radio" id="inch_yes" value="yes" name="inch" />
<label for="inch">Yes</label>
<input type="radio" id="inch_no" value="no" name="inch" />
<label for="inch">No</label>
</div>
</fieldset>
<input type="submit" value="Send" id="my_button" />
</div>
<div id="div_form_2">
<span>Model:</span>
<select name="moto" size="1" id="motoSelect">
<option value="1">FIrst value(options)</option>
<option value="2">Second value(options)</option>
<option value="3">Third value(options)</option>
<option value="4">Fourth value(options)</option>
</select>
<span>Days:</span>
<select name="days" size="1" id="daysSelect">
<option value="1">1</option>
<option value="2">2</option>
</select>
<p><strong>Your email:</strong></p>
<input type="text" id="email" value="Example: [email protected]" />
<p><strong>Your desires:</strong></p>
<textarea cols="45" rows="2" id="mytextarea"></textarea>
</div>
</fieldset>
</div>
</form>
</body>
</html>
'切換(FN,FN)'在1.8已被廢棄,再後來取出1.9 – Satpal