|
Post by MonsterControl on Jan 27, 2012 2:27:49 GMT -4
<script type = 'text/javascript'> /*Multiple Skins & Codes By Wrighty - Tutorial*/
if(pb_skinid == 3){ /*An Example Code*/
var d = document.getElementsByTagName('a'); for(a = 0; a < d.length; a++){ if(d[a].width == '1%' && d[a+1].width == '1%'){ d[a].style.display = 'none'; } } document.getElementById('unique_id_here').style.display = ''; document.write('<style type = "text/css">.menubg { background-image: url("URL HERE");}</style>'); } </script>
That would work for skin 3. But what if we have more skins? Just add an 'else if' function to the end. eg:
<script type = 'text/javascript'> /*Multiple Skins & Codes By Wrighty - Tutorial*/
if(pb_skinid == 3){ /*An Example Code*/
var d = document.getElementsByTagName('a'); for(a = 0; a < d.length; a++){ if(d[a].width == '1%' && d[a+1].width == '1%'){ d[a].style.display = 'none'; } } document.getElementById('unique_id_here').style.display = ''; document.write('<style type = "text/css">.menubg { background-image: url("URL HERE");}</style>'); }else if(pb_skinid == 4){
/*Execute some code here */
} </script>
|
|