O.K. here an example with an own script: When registering, "Additional Infos" will be collapsed:
Replace in Template
register
Code:
<h3 class="blocksubhead">{vb:rawphrase additional_information}</h3>
with
Code:
<script type="text/javascript">
function RegistryDetailsOn (setcookie) {
$("#registry_details").css({ "display": "" });
$("#registry_details_link").css({ "background": "url('images/buttons/collapse_40b.png') no-repeat scroll 0 0 transparent","padding-left": "17px"});
_set_cookie('RegistryDetails_visible', 1, setcookie);
}
function RegistryDetailsOff (setcookie) {
$("#registry_details").css({ "display": "none" });
$("#registry_details_link").css({ "background": "url('images/buttons/collapse_40b_collapsed.png') no-repeat scroll 0 0 transparent","padding-left": "17px" });
_set_cookie('RegistryDetails_visible', 0, setcookie);
}
function RegistryDetailsInit () {
t = fetch_cookie('RegistryDetails_visible');
if (t=="1") {
RegistryDetailsOn(0);
} else {
RegistryDetailsOff(0);
}
}
function RegistryDetailsSwitch () {
if ($("#registry_details").css("display") == "none") {
RegistryDetailsOn();
} else {
RegistryDetailsOff();
}
}
function _set_cookie(variable, wert, setzen) {
if (!(setzen==0)) {
set_cookie(variable, wert);
}
}
$(document).ready(function(){
RegistryDetailsInit();
});
</script>
<h3 class="blocksubhead"><a href="javascript:RegistryDetailsSwitch()" id="registry_details_link">{vb:rawphrase additional_information}</a></h3>
<div id="registry_details">
and
Code:
{vb:raw customfields_other}
</div>
with
Code:
{vb:raw customfields_other}
</div>
</div>
This Solution uses jQuery and the vB-Cookie-Routines. The Script could be reduced to one switch-line, but this way you have all possibilities for more extended issues.
Regards, Bruno