I think there's an error somewhere in your amended js which is causing the whole thing to fail. However, my original code is still not solving the issue. Also, just noticed I typed $(window).ready() not $(window).load() in my code above. Oops.
This is, I think, because the $(this).load() in the script is never completing on the initial load. If I take this function out, then the script works on this
test page.
The amended code is:
Code:
$(window).load(function(){
if($('.Rating img').length > 0) {
$('.Rating img').each(function() {
if($(this).height() == 0) {
var imgName = $(this).attr('src').split('/');
var imgKey = imgName.length-1;
setProductListHeights(imgName[imgKey]);
} else {
setProductListHeights();
return false;
}
});
} else {
setProductListHeights();
}
});
I've attached my amended js file as a text file.