Here's a version of the code I'm using, stripped down to just the parts that aren't working. This is all written to generate some basic pagination with jQuery.
In Chrome/Safari/Moz, I generate see spans, 1,2,3,4,...,etc
When I look in IE7/8, I see etc,...,4,3,2,1
The string seems to be concatenating backwards!!
This seems very strange to me, because there's not a whole lot going on in the code here, I can't figure out which bit could be causing problems.
Obviously, the 1,2,3,4,...,etc is what I'm aiming for here, so as well as an explanation of why this is an issue, I'd love it if someone could offer a quick fix.
myVar = {
arr:$.makeArray($('.my_li'))
};
var str;
str='';
for (s in myVar.arr){
r=parseInt(s,10)+1;
str+='<span class="my_class">'+r+'</span>';
}
$('#my_other_div').html(str);