Hello guys I have a DIV that I got passed trought a js function :
function print(divId) {
var det = document.getElementById(divId);
$(divId).removeClass(); ..
$(divId).removeAttr(); ..
var mywindow = window.open(' ', 'Print');
mywindow.document.write('<html><head><title>Account Detail</title>');
mywindow.document.write('<link href="../../css/reset-min.css" rel="stylesheet" type="text/css" />');
mywindow.document.write('</head><body>');
mywindow.document.write(det.innerHTML);
mywindow.document.write('</body></html>');
}
I’ve been tryed with some jQuery functions like the showed above, buy it not works because styles are inherits from css templates, so How can I remove completly the CSS and Styles attributes completly.. I hear about YUI Reset http://developer.yahoo.com/yui/reset/ but I don’t know how to use it in a new Windows Popup
Thanks!
Just use the
.css(jQuery method and remember to append !important if necessary to enforce overriding.This will effectively set the
style="attribute on the element.