On this page, my javascript file only intermittently executes. There is an alert call in the file to make it obvious when it’s executing. The contents of the file in question are below.
As far as I can tell, this is only happening in Internet Explorer 9.
What can I do to determine why it is not always executing?
Code in question:
jQuery(document).ready(function($) {
if ($('.flexslider').length) {
console.log($('.flexslider').length);
$('.flexslider').flexslider({
controlNav: false,
animation: "slide",
});
alert('sucess');
}
});
The problem is with console.log. In IE if you don’t have the Developer Tools window open, console is undefined.