Saturday, 24 August 2013

Why does jquery code not working on the server but works on my PC?

Why does jquery code not working on the server but works on my PC?

I am struggling with a problem of an html page not rendering the same way
on the hosting company's server compared with my PC. This is how it looks
in Chrome: http://www.i-learn-french.com/html5/audiocards.html On my PC in
IE it looks a little different, but preserves most of its functionality,
while on the server it looks like the jquery code doesn't work.
if ($.browser.msie) {
var head = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
var linkchrome = document.getElementById('#chromelink');
link.id = 'newlink';
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = '../ie/iestyles.css';
link.media = 'all';
$(link).appendTo(head);
head.removeChild($linkchrome);
}
Why does this code work on my PC and not on the server? Thanks a lot.

No comments:

Post a Comment