JavaScript If statement not working in IE
<p>I have the following code, which is working great in firefox and chrome, but not working in Internet Explorer...</p>

<pre><code>$("#nav-tabs").on("click", "a", function(e) {
    e.preventDefault();
    $(this).tab('show');
    $('li#test').each(function() {
        if($(this).attr('class') == "active")
        {
            //Active class is applied
            $(this).children().children().attr("src", "assets/img/button_home_selected3.png");
        }
        else
        {
            $(this).children().children().attr("src", "assets/img/button_home_plain.png");
        }
    });
});
</code></pre>

<p>Is there any problems with conditional statements with IE???</p>

<p>Here is the HTML</p>

<pre><code>&lt;ul id="nav-tabs" data-tabs="tabs"&gt;
   &lt;li id="test" style="list-style: none;" class="active"&gt;
        &lt;a href="#home" data-toggle="tabs" &gt;&lt;img src="assets/img/button_home_selected3.png" id="test2"  width="83" /&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>More over, the li tags are Addded dynamically...</p>
