2

When I clear my cache and I open a new session of IE, then navigate to the website I'm developing, the javascirpt/jQuery does not run. The site structure shows up fine, without any errors in the F12 console, but everything is rendered without any of my javascript plugins, breaking quite a few elements. Everything works fine in Chrome/Safari/Firefox/Mobile Browsers. Nothing I am outputting in the LOG gets rendered, so I'm assuming that all the JS is not getting run. When I refresh the page, everything works as it's supposed to. After that, it won't break until I clear my cache, close IE, and start a new session, like the experience of a first time user.

What could be causing the javascript to not run the first time? I'm having a hard time debugging, or finding similar issues.

javascript libraries I'm using:

  • jquery-1.8.2 min
  • scrollTo.js
  • reveal.js
  • slides.js
  • qtip.js

EDIT: Here is a link to the JS code I'm using

6
  • Can you show your code? Are you calling your startup functions in the $(document).ready() function? Any error in the console? Commented Dec 6, 2012 at 14:55
  • Seeing the jQuery code you've written would help us pin down the problem. Help us to help you. Commented Dec 6, 2012 at 14:55
  • It's difficult to answer your question without seeing your code. Can you give us the site URL? or post your page source code? Commented Dec 6, 2012 at 14:56
  • I edited the question to include a link to my source code. I didn't include it initially, because it is quite a bit of code to look through. Commented Dec 6, 2012 at 15:01
  • the actual html page that the files are included on would be helpful Commented Dec 6, 2012 at 15:02

1 Answer 1

9

IE won't run console.log() unless the console window is open. So right now, your code will stop at that point on IE. Even thought you have the console window open, I've had issues where it just won't work. Try commenting it out.

Sign up to request clarification or add additional context in comments.

3 Comments

Instead of commenting/uncommenting all the console-calls one can do something like: var console = console || {log: function () {}};
Yes! I never knew this. Worked spot on the first time. Thank you.
@romo Thanks for your reply, you saved my day..!! Really appreciate your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.