I have this code to add a stylesheet to a page in a fancybox iframe. Can I do the same to the parent page?
I have tried this but it didn't work...
window.parent.changeStyles(stylesheet)
;
function changeStyles(styles) { $("", { rel: "stylesheet", type: "text/css", href: styles }).appendTo("head"); };
$('.change-styles').on('click',function(){
var stylesheet = $(this).attr('href');
changeStyles(stylesheet);
return false
});