title: Prinitng issue in jQuery
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  
      function PrintElem()
      {
              var mydiv1 = document.getElementById("div1");
              var mydiv2= mydiv.getElementsByTagName("div2");
         printTheDivs(mydiv1, mydiv2);
      }
  
      function printTheDivs (d1,d2) 
      {
          var mywindow = window.open('', 'my div', 'height=400,width=600');
           mywindow.document.write('&lt;html&gt;&lt;body&gt;' + d1.innerHTML + '&lt;/body&gt;&lt;/html&gt;');
  //Here I want to show the Images in this window.
  
  $(d2).print();
  
  //but want to print the Div2 Images I’m using the jquery.print.js plugin but not working. It is printing complete page. How to accomplish the task with multiple Browsers.
  
  
      }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="div1"&gt;
  &lt;img src=”image1.jpg”/&gt;
  &lt;img src=”image2.jpg”/&gt;
  &lt;img src=”image3.jpg”/&gt;
  &lt;img src=”image4.jpg”/&gt;
  &lt;img src=”image5.jpg”/&gt;
  &lt;/div&gt;
  
  &lt;div id="div2"&gt;
  &lt;img src=”image6.jpg”/&gt;
  &lt;img src=”image7.jpg”/&gt;
  &lt;img src=”image8.jpg”/&gt;
  &lt;img src=”image9.jpg”/&gt;
  &lt;img src=”image10.jpg”/&gt;
  &lt;/div&gt;
  
  &lt;input type="button" value="Print Div" onclick="PrintElem()" /&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to show one div using window.open() and print another div. I’m using the jquery.print.js plugin but not working. It is printing complete page. How to accomplish the task with multiple Browsers. Please help me. Thanks in advance. </p>