mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-11-02 11:26:26 +00:00
19 lines
403 B
JavaScript
19 lines
403 B
JavaScript
|
function ToggleEnableIf(anchor)
|
||
|
{
|
||
|
if (!anchor.hasOwnProperty('enableIfHidden'))
|
||
|
anchor['enableIfHidden'] = true;
|
||
|
anchor.enableIfHidden = !anchor.enableIfHidden;
|
||
|
|
||
|
content = anchor.parentNode.getElementsByTagName('span')[0]
|
||
|
if (anchor.enableIfHidden)
|
||
|
{
|
||
|
anchor.style.display = "";
|
||
|
content.style.display = "";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
anchor.style.display = "none";
|
||
|
content.style.display = "block";
|
||
|
}
|
||
|
}
|