Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had the exact same issue that you had. I had a set of images that I wanted to ensure were preloaded before I began starting a slideshow. I was making use of </p> <pre><code>$(window).load(function(){ //All my code }); </code></pre> <p>And this is exactly what I was facing.</p> <ul> <li>When I copied and pasted the URL in IE, the onload event did not seem to fire.</li> <li>If I open the console using F12 and then past the URL in the browser and pressed enter, the everything seemed to be working.</li> <li>Now that I opened the console at least once, <ul> <li>If I closeed the console and then reloaded the page, the onload was firing.</li> <li>If I typed the URL and then pressed enter, the onload was firing.</li> </ul></li> </ul> <p>It took me a couple of days to actually figure out what I was doing wrong.</p> <p>The issue was with the console.log statements. At a lot of places in my code, I had done a lot of console logging. Even one of the plugins that I was using - jplayer has a an uncommented console message somewhere in the code.</p> <p>The issue was that, unless you open the console at least once in IE, the console object is not available. Which means that the code will fail at the first console.log that it encounters.</p> <p>Now, I was in no mood to comment out all my console.log statements just for the sake of testing it in IE. So, this is what I did instead. Right at the top of my document.ready jquery function, I wrote this small snippet of code.</p> <pre><code>if(!window.console){ console={}; console.log = function(){}; } </code></pre> <p>What it basically does is creates a dummy console.log function placeholder so that the code can run in IE but it will work only as long as console.log is the only console function that you are making use of in your code or in your plugins.</p> <p>Just my 2 cents. Been pulling my hair over this issue for longer than I care to admit. I hope this is useful to at least someone.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload