title: jquery hide and show for printing
body: <p>Is it possible to set different properties for jquery show and hide for different media(ex print and screen)?</p>
  
  <p>Lets say I have 2 divs and one button that shows and hides one div and show another. But when I hit print, I would like to show both of them. Despite that if I define in css for printing that it is display:inline; block that is currently hidden is hidden in the print.
  How can I resolve this?
  Thank you
  Dorijan</p>
  
  <p>here is the sample:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;style type="text/css"&gt;
  @media print{
      #div1{
          display:block;
      }
  
      #div2{
          display:block;
      }
  }
  &lt;/style&gt;
  
  &lt;div id="div1"&gt;Div1&lt;/div&gt;
  &lt;div id="div2"&gt;Div2&lt;/div&gt;
  &lt;a href="#" onclick="$('#div1').hide();$('#div2').show();"&gt;Showdiv1&lt;/a&gt;
  &lt;a href="#" onclick="$('#div2').hide();$('#div1').show();"&gt;Showdiv1&lt;/a&gt;
  </code></pre>