The application on which m working I am calling CSS file from remote server dynamically and remote server side we are using node.js where file loads but not apply CSS on the page.
When I try to add the path other than node.js server path it works properly and when I add some CSS from javascript this also works.
I tried following option
loadCSS = function(href) { var href = "http://192.168.0.64:3001/public/stylesheets/enduserchat.css"; var cssLink = $(""); $("head").append(cssLink); }; // not working
$('head').append('http://192.168.0.64:3001/public/stylesheets/enduserchat.css" type="text/css" />') // (remote side node.js) not working
$('head').append('http://demo23.easternenterprise.com/webrtc/css/chats.css" type="text/css" />') // working (without node js)
function loadjscssfile(filename) { var fileref=document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css") fileref.setAttribute("href", "http://192.168.0.64:3001/public/stylesheets/enduserchat.css") document.getElementsByTagName("head")[0].appendChild(fileref); } // not working
Plz help me out for this.