DD Script: Tab Content Script
url:http://www.dynamicdrive.com/dynamici...tabcontent.htm
I am trying to change colour for selected/not selected tab, but I always get "tabobjlinks[..] is null or not an object" error.![]()
I had changed the css too.Code:function highlighttab(aobject){ if (typeof tabobjlinks=="undefined") collecttablinks() for (i=0; i<tabobjlinks.length; i++) tabobjlinks[i].style.backgroundColor=initTabcolor tabobjlinks[i].style.color="white" var themecolor=aobject.getAttribute("theme")? aobject.getAttribute("theme") : initTabpostcolor aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor aobject.style.color="#C35151" }
Code:<style type="text/css"> #tablist{ padding: 3px 0; margin-left: 0; margin-bottom: 0; margin-top: 0.1em; font: bold 12px Verdana; } #tablist li{ padding: 3px 0; list-style: none; display: inline; margin: 0; } #tablist li a{ padding: 3px 3px; margin-left: 0px; margin-right: -3px; border: 1px solid #C5E1E9; border-bottom: none; background-color:#A5BCD3; color:#F3F8FD ; } #tablist li a:link, #tablist li a:visited{ text-decoration: none; } #tablist li a.current{ color:#C35151; background: #F3F8FD; text-decoration: none; } .tabcontent{ display:none; } </style>



Reply With Quote


Bookmarks