FSTUTS FORUMERS
Dont forget to join!

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

Thank You!

Join the forum, it's quick and easy

FSTUTS FORUMERS
Dont forget to join!

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

Thank You!
FSTUTS FORUMERS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Load your layout only on Firefox

Go down

Load your layout only on Firefox Empty Load your layout only on Firefox

Post by [ MALIBOG ] Jendrick 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
[ MALIBOG ] Jendrick
[ MALIBOG ] Jendrick
ADMIN
ADMIN

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

Back to top Go down

Back to top

- Similar topics

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