Hi guys, I just want to import an external stylesheet into an iframe's head tag. Is it possible ?
i have tried
<!DOCTYPE HTML> Untitled Document #content{width:600px;height:500px;margin:0 auto;} $(document).ready(function() { $('#content').load(function(){ // var timestamp = +(new Date()); //$('#content').contents().find('head').append(''); //$("http://vasterad.com/themes/nevia/css/style.css[type='text/css']").clone().appendTo($("iframe").contents().find("head")); $('iframe').contents().find('head').append().html(''); alert('hi'); }); });
This might be of use: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-inject-custom-html-and-css-into-an-iframe
You can do it if you own the iframe.
Hi guys, I just want to import an external stylesheet into an iframe's head tag. Is it possible ?
i have tried
<!DOCTYPE HTML> Untitled Document #content{width:600px;height:500px;margin:0 auto;} $(document).ready(function() { $('#content').load(function(){ // var timestamp = +(new Date()); //$('#content').contents().find('head').append(''); //$("http://vasterad.com/themes/nevia/css/style.css[type='text/css']").clone().appendTo($("iframe").contents().find("head")); $('iframe').contents().find('head').append().html(''); alert('hi'); }); });This might be of use: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-inject-custom-html-and-css-into-an-iframe
You can do it if you own the iframe.