title: Jquery id selector not working on INTERNET EXPLORER
body: <p>Why this does not work ON INTERNET EXPLORER:</p>
  
  <p>I have this html input tag. I call my js function to do some staff on the toprint element. In FF, chrome it works. But on IE I get "missing argument error".</p>
  
  <pre><code>&lt;input type="button" onclick="PrintElem('#ToPrint')" value="&lt;?php echo t("DOWNLOAD");?&gt;" /&gt;
  </code></pre>
  
  <p>The div element is somewhere in the page like:</p>
  
  <pre><code>    &lt;div class="letterBody paddingLg LmarginXlg"  id="ToPrint"&gt;
  &lt;p&gt;bla bla&lt;/p&gt;
  &lt;/div&gt;
  
   &lt;script type="text/javascript" language="javascript"&gt;
  
  
      function PrintElem(elem)
  
      {
  
          Popup($(elem).html());
      }
  
      function Popup(data)
  
      {
  
          var mywindow = window.open('', 'Press Release');
          mywindow.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;?php echo $data-&gt;title  ;?&gt;&lt;/title&gt;');
          mywindow.document.write(' &lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php echo base_path().$directory; ?&gt;/css/printA4.css"/&gt;');
          mywindow.document.write('&lt;/head&gt;&lt;body  onload="" class="printA4"&gt;');
          mywindow.document.write(data);
  
  /*
                  $(document).ready(function() {
                  this.title = '&lt;?php echo $data-&gt;title  ;?&gt;'
  
  
                   var salonLogo =   $("#salonLogo").attr("src")
                   var imgSalonLogo = salonLogo.search("salonlogo")
                   if(imgSalonLogo == -1){
                       $("#salonLogo").attr("src","")
                   }
  
  
                  })
  */
  
          mywindow.document.write('&lt;/body&gt;&lt;/html&gt;');
          mywindow.document.close();
          mywindow.print();
          return true;
      }
  
      $(document).ready(function() {
      this.title = '&lt;?php echo $data-&gt;title  ;?&gt;'
      })
  
  &lt;/script&gt;
  </code></pre>