diff options
Diffstat (limited to 'phpBB/adm/style/overall_header.html')
-rw-r--r-- | phpBB/adm/style/overall_header.html | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 7e7f0cecee..668c0f4e92 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -37,21 +37,23 @@ function jumpto() /** * Set display of page element -* s[-1,0,1] = hide,toggle display,show +* +* @param string id The ID of the element to change +* @param int action Set to 0 if element display should be toggled, -1 for +* hiding the element, and 1 for showing it. +* @param string type Display type that should be used, e.g. inline, block or +* other CSS "display" types */ -function dE(n, s, type) -{ - if (!type) - { +function dE(id, action, type) { + if (!type) { type = 'block'; } - var e = document.getElementById(n); - if (!s) - { - s = (e.style.display == '') ? -1 : 1; + var display = jQuery('#' + id).css('display'); + if (!action) { + action = (display === '' || display === type) ? -1 : 1; } - e.style.display = (s == 1) ? type : 'none'; + jQuery('#' + id).css('display', ((action === 1) ? type : 'none')); } /** |