using JQuery on beforeprint event problem. Not answered.

Posted by Cesar Lopez on Stack Overflow See other posts from Stack Overflow or by Cesar Lopez
Published on 2010-03-18T10:30:36Z Indexed on 2010/03/19 11:21 UTC
Read the original article Hit count: 172

Hi all,

I have the following function.

<script type="text/javascript">
     window.onbeforeprint = expandAll;

     function expandAll(){
       $(".fieldset:gt(0)").slideDown("fast");
      }
</script>

For this html

<table class="sectionHeader" ><tr ><td>Heading</td></tr></table>
 <div style="display:none;" class="fieldset">Content</div>

I have several block of content over the page, but when I do print preview or print, I can see all divs sliding down before opening the print preview or printing but on the actual print preview or print out they are all collapse.

Anyone have any idea why is this?

Thanks.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript