Travis Northcutt
Travis Northcutt

Reputation: 25036

Javascript intermittently executing in IE9

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');
    }
});

Upvotes: 0

Views: 310

Answers (1)

Adrian Ber
Adrian Ber

Reputation: 21390

The problem is with console.log. In IE if you don't have the Developer Tools window open, console is undefined.

Upvotes: 4

Related Questions