1

How can I include an external css file in jqprint? What could be the problem with my code why I can t Hide a simple button using an inline stylesheet with a media which is equal to print? Here is my sample code.

<style type="text/css" media="print">

#hide
{
    display:none;
}

</style>

<script type="text/javascript" src="js/jquery.jqprint-0.3.js"></script>

<script type="text/javascript">
    $(function() {
        $( "#printMe" ).click(function() {
            $('#print').jqprint();

        });
    });
</script>

<div id="header">
    <h1>This is the Header</h1>
</div>

<div id="print"><br />
    <input type="button" id="hide" value="hidden"/>
    <input type="button" id="printMe" value="Print Me"/>
</div>

When I just use javascript's window.print, it hides the button with the id hide. What could be the problem ?

Arjel
  • 469
  • 2
  • 10
  • 16

1 Answers1

0

Here is WORKING DEMO

see this http://jsfiddle.net/v6K58/

 $(function() {
        $( "#printMe" ).click(function() {
            $('#header').jqprint();

        });
    });​

bold text print

Sender
  • 6,660
  • 12
  • 47
  • 66
  • of course it will be hidden when you print it because it is hidden right from the start. What I want is to hide an element which is visible when I load the page. – Arjel Sep 07 '12 at 08:08
  • yes you can [add css see this](https://github.com/tanathos/jquery.jqprint/blob/master/jquery.jqprint-0.3.js) u can [try this way](http://jsfiddle.net/v6K58/2/) – Sender Sep 07 '12 at 08:20