I use this code to create a simple jquery carousel animation:
$(document).ready(function() {
var slide = 1;
$('#arrow-left').click(function() {
if (slide == 1) {
$("#slideshow-train").animate({left: '-840'}, 2000);
slide = 2;
} else if (slide == 2) {
$("#slideshow-train").animate({left: '-1680'}, 2000);
slide = 3;
} else if (slide == 3) {
$("#slideshow-train").animate({left: '0'}, 1000);
slide = 1;
}
});
});
This code works fine in all major browser except Internet Explorer 7! It even works fine in IE6! The problem is that click function doesn’t work in IE7 at all. Can anyone please point out what is the problem and how can I solve it?
Here is the demo of page. Just click the left arrow (the right hand button doesn’t work :)). It should work in all browsers excerpt IE7.
This solved my problem!