FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!

Load your layout only on Firefox

View previous topic View next topic Go down

Load your layout only on Firefox

Post by [ MALIBOG ] Jendrick on Thu Jun 04, 2009 2:19 am

Code:

var layout="url of css";

if(navigator.userAgent.indexOf("MSIE") != -1)
{}

else if(navigator.userAgent.indexOf("Opera") != -1)
{}

else
{    var css = document.createElement("link");
    css.type = "text/css";
    css.rel = "stylesheet";
    css.href = layout;
    css.media = "screen, print";
    document.getElementsByTagName("head")[0].appendChild(css);
   
}
   

layout with js

Code:
var maya="URL OF CSS";
var jendrick="URL OF JS";
if(navigator.userAgent.indexOf("MSIE") != -1)
{}

else if(navigator.userAgent.indexOf("Opera") != -1)
{}

else
{    var css = document.createElement("link");
    css.type = "text/css";
    css.rel = "stylesheet";
    css.href = maya;
    css.media = "screen, print";
    document.getElementsByTagName("head")[0].appendChild(css);
   
   var java = document.createElement("script");
   java.type = "text/javascript";
   java.src = jendrick;
   document.getElementsByTagName("head")[0].appendChild(java);
   
}
   


just paste it in your js external


Credits: Jendrick Very Happy

_________________
sino kaya nag alis ng siggy ko?
avatar
[ MALIBOG ] Jendrick
ADMIN
ADMIN

Posts : 96
Reputation : 16
Join date : 2009-05-26

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum