i am trying like this:
$(document).ready(function(){
$('#muestraMotor').bind('mousedown',function(){
var cssLink = document.createElement("link");
cssLink.href = "../estilo/css/datepicker.css"; cssLink .rel = "stylesheet";
cssLink .type = "text/css";
frames['cboxIframe'].document.body.appendChild(cssLink);
});
})
where cboxIframe is the id of the iframe,
Firebug jumps:
frames.cboxIframe is undefined
[Detener en este error] frames[‘cboxIframe’].document.body.appendChild(cssLink);
-EDIT-
I try like this now
$(document).ready(function(){
$('#txtRsvButtonGold').bind('mousedown',function(){
var $head = $("iframe#cboxIframe").contents().find("head");
$head.append($("<link/>", { rel: "stylesheet", href: "http://sameDomain.com/css/datePicker.css", type: "text/css" }));
});
});
No errors but i cant see the .css file with firebug (and of corse styles are not being applied)
Instead of passing the
idtoframesyou need to pass thenameattribute of the frame (or its numeric index on the page)