מדיה ויקי:Gadget-ondemand-Tabs.js: הבדלים בין גרסאות בדף

Maintenance: mw:RL/MGU - Updated deprecated module name
maintenance: TypeError: null is not an object (evaluating 'tdSelected.style')
שורה 25: שורה 25:
         // style the selected tab
         // style the selected tab
         var tdSelected = document.getElementById(selectedID);
         var tdSelected = document.getElementById(selectedID);
         tdSelected.style.background = 'white';
         if (tdSelected) {
        tdSelected.style.borderBottom = 'none';
            tdSelected.style.background = 'white';
        tdSelected.style.cursor = 'default';
            tdSelected.style.borderBottom = 'none';
            tdSelected.style.cursor = 'default';
        }
          
          
         // show the content
         // show the content
         var tdContent = document.getElementById('custom' + id + 'TabsContent');
         var tdContent = document.getElementById('custom' + id + 'TabsContent');
         tdContent.innerHTML = arrTabContent['a' + id + ((id == 10) ? selectedID.slice(11) : selectedID.slice(10))];
         if (tdContent) {
            tdContent.innerHTML = arrTabContent['a' + id + ((id == 10) ? selectedID.slice(11) : selectedID.slice(10))];
        }
     }
     }