mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 04:48:53 +00:00
[ticket/11562] Use jQuery in subPanels
PHPBB-11562
This commit is contained in:
parent
d091c4f829
commit
2624d1ea14
1 changed files with 3 additions and 17 deletions
|
@ -117,29 +117,15 @@ jQuery(document).ready(function() {
|
|||
}
|
||||
|
||||
function subPanels(p) {
|
||||
var i, e, t;
|
||||
var i;
|
||||
|
||||
if (typeof(p) === 'string') {
|
||||
show_panel = p;
|
||||
}
|
||||
|
||||
for (i = 0; i < panels.length; i++) {
|
||||
e = document.getElementById(panels[i]);
|
||||
t = document.getElementById(panels[i] + '-tab');
|
||||
|
||||
if (e) {
|
||||
if (panels[i] === show_panel) {
|
||||
e.style.display = 'block';
|
||||
if (t) {
|
||||
t.className = 'activetab';
|
||||
}
|
||||
} else {
|
||||
e.style.display = 'none';
|
||||
if (t) {
|
||||
t.className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
|
||||
jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue