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://ift.tt/1IEIHsJ"; var cssLink = $(""); $("head").append(cssLink); }; // not working
$('head').append('http://ift.tt/1IEIHsJ" type="text/css" />') // (remote side node.js) not working
$('head').append('http://ift.tt/1xZSdWV" 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://ift.tt/1IEIHsJ") document.getElementsByTagName("head")[0].appendChild(fileref); } // not working
Plz help me out for this.
Aucun commentaire:
Enregistrer un commentaire