Use internal functions to show/hide an element
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 7 Aug 2018 11:48:07 +0000 (13:48 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 7 Aug 2018 11:48:07 +0000 (13:48 +0200)
wcfsetup/install/files/acp/templates/trophyAdd.tpl

index 8908e038079e8d2838d2205deef72231df9ae07c..c62a82ce1f651866fcc0b27a6c3483ff7328bd01 100644 (file)
                
                elBySel('select[name=type]').addEventListener('change', function () {
                        if (elBySel('select[name=type]').value == 1) {
-                               elById('imageContainer').style.display = 'block';
-                               elById('badgeContainer').style.display = 'none';
+                               elHide(elById('badgeContainer'));
+                               elShow(elById('imageContainer'));
                        } 
                        else if (elBySel('select[name=type]').value == 2) {
-                               elById('imageContainer').style.display = 'none';
-                               elById('badgeContainer').style.display = 'block';
+                               elShow(elById('badgeContainer'));
+                               elHide(elById('imageContainer'));
                        }
                });