Update: I have determined that IE9 recognizes the count and increases it, but I can't get it to change the text in the paragraph. I updated the code below and the js fiddle.
This isn't working in IE9 - does anyone know why? Or what I am doing wrong?I'm not quite sure why, it seems like a simple counter like this wouldn't be much trouble. I am able to test IE9 in Browserstack. Thanks in advance.
http://jsfiddle.net/sywx1ws7/4/
<p id="mycount">NULL</p>
<p class="correct-ans active-trigger">Click Counter</p>
$(document).ready(function(){
var count = 0;
$('p#mycount').text(count);
$( ".correct-ans.active-trigger" ).click(function() {
alert(count);
count += 1;
console.log(count);
if(count == 0){
//do something
$('p#mycount').text(0);
}
else if(count == 1) {
//do something
$('p#mycount').text(1);
}
else if(count == 2) {
//do something
$('p#mycount').text(2);
}
else if(count == 3) {
//do something
$('p#mycount').text(3);
}
else if(count == 4) {
//do something
$('p#mycount').text(4);
}
else if(count == 5) {
//do something
$('p#mycount').text(5);
}
else {
}
});
});