$('body').append('<style type="text/css"> body {background:red;} </style>');
This doesn't make the background red. Is there away outside the .css() function to do this? I get css, html and jQuery javascript seperatly through an ajax request so how do I append it the best way?
Ok I was trying to simplify the problem but this actually works.. so heres the whole code
edit : function(page) {
$.ajax({
data : {
'edit' : page
},
success : function(i){
var html = jQuery.parseJSON(i);
$('#editPageListContainer, #editPreview').remove();
var script = document.createElement('script');
script.type = 'text/javascript';
script.text = html.js;
document.body.appendChild(script);
$('body').append('<style type="text.css">' + html.css + '</style>' + html.php);
}
});
}
*OMG... a typo "text.css" in the style type... love this font it's so clear to see, love you guys anyway!*