Error using jQuery 1.5.X and Firefox 4
Hi!
I updated to firefox 4 and ran in to a strange problem that some of you might better understand ...
Problem
I have a pretty complex page developed using jQuery 1.4.X --> 1.5.X and the page works withouth any errors in IE 8, IE 9 , and Chrome 10 but fails with error in FireFox 4 when using jQuery 1.5.X but is working when using jQuery 1.4.X
The code failing is returning the following error :
$(".spSelectList_item").css is not a function
The Code below is failing when using jQuery 1.5.X and FF4 but it works without any problem when using 1.4.X and FF4
//wrap elements with div
var wrapElements = function (elem, width, height, row) {
elem.children("li").wrapInner('<div class="spSelectList_item"></div>');
$(".spSelectList_item").css("height", height + "px");
var newwidth = Math.ceil((parseInt(width, 10)) / parseInt(row, 10)) - 11;
$(".spSelectList_item").css("width", newwidth + "px");
}
I might have missed something obvious related to changes in jQuery between 1.4 and 1.5 related to Firefox so the quick fix of cause to explicitly load jQuery 1.4.X for this page in order to avoid the error but any help understanding the root cause of this error would be greatly appreciated.
Best regards Anders Nilsson