1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>jQuery Collapsible Fieldset</title>
5 <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
6 <script language="javascript" type="text/javascript" src="js/jquery.coolfieldset.js"></script>
7 <link rel="stylesheet" type="text/css" href="css/jquery.coolfieldset.css" />
10 <h1>jQuery Collapsible Fieldset</h1>
13 <fieldset id="fieldset1" class="coolfieldset">
14 <legend>Default</legend>
16 <p>By default the <b>fieldset</b> is opened or expanded at start. Click on its <b>legend</b> to close or collapse it.</p>
18 <p>The code is simply like below</p>
20 $('#fieldset1').coolfieldset();
25 <fieldset id="fieldset2" class="coolfieldset">
26 <legend>Closed at start</legend>
29 <p>If we want the fieldset to be closed or collapsed at start, just add <b>{collapsed:true}</b> as the argument.</p>
31 $('#fieldset2').coolfieldset({collapsed:true});
37 <fieldset id="fieldset4" class="coolfieldset">
38 <legend>Animation Speed</legend>
40 <p>You can also define the animation speed for the fieldset while collapsing or expanding by using <b>speed</b> option. Acceptable values are "<b>fast</b>", "<b>medium</b>", "<b>slow</b>", or a number in millisecond.</p>
43 $('#fieldset3').coolfieldset({speed:"fast"});
48 <fieldset id="fieldset5" class="coolfieldset">
49 <legend>No Animation</legend>
51 <p>If you don't want to use animation effect, please use <b>animation</b> option and fill its value with <b>false</b>.</p>
54 $('#fieldset4').coolfieldset({animation:false});
59 <fieldset id="fieldset3" class="coolfieldset">
60 <legend>Notes :</legend>
64 <li>All content inside fieldset (except the <b>legend</b> tag) should be placed inside the <b>div</b> tag.</li>
65 <li>Edit the <b>jquery.coolfieldset.css</b> to change the fieldset style.</li>
71 $('#fieldset1, #fieldset3').coolfieldset();
72 $('#fieldset2').coolfieldset({collapsed:true});
73 $('#fieldset4').coolfieldset({speed:"fast"});
74 $('#fieldset5').coolfieldset({animation:false});