aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-04-07 20:40:21 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-04-07 20:40:21 +0200
commit385420c8f5697b1978ebd1bdfcd138d5ce88b98a (patch)
tree5c34b2bccfe97f733f9a12a2b5096a5280a66342
parentf0176b53934e78b830b890ef46c1e8e7c233bee4 (diff)
downloadforums-385420c8f5697b1978ebd1bdfcd138d5ce88b98a.tar
forums-385420c8f5697b1978ebd1bdfcd138d5ce88b98a.tar.gz
forums-385420c8f5697b1978ebd1bdfcd138d5ce88b98a.tar.bz2
forums-385420c8f5697b1978ebd1bdfcd138d5ce88b98a.tar.xz
forums-385420c8f5697b1978ebd1bdfcd138d5ce88b98a.zip
[ticket/12372] Use jQuery in javascript dE() function
PHPBB3-12372
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index de51b54e9b..7d114d9593 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -93,19 +93,23 @@ function viewableArea(e, itself) {
/**
* Set display of page element
-* s[-1,0,1] = hide,toggle display,show
-* type = string: inline, block, inline-block or other CSS "display" type
+*
+* @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) {
+function dE(id, action, type) {
if (!type) {
type = 'block';
}
- var e = document.getElementById(n);
- if (!s) {
- s = (e.style.display === '' || e.style.display === type) ? -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'));
}
/**