[jQuery] IE7 jQuery event problem
Hi!
I have a script that adjusts the layout of the page, depending on the
window size, but IE7 throws an error.
The script works fine in FF/Safari/IE6.
When the page loads both scripts are fired, and the layout is set. If
you then resize the browser window IE7 throws an error.
Can someome tell me what is wrong with this script?
jQuery is 1.2.1
$("document").ready(ypos);
$("document").ready(wresizeListener);
function ypos(){
var content_height = $('#content').height();
var secnavi_height = 40;
var simImage_height = -36; // CSS compensation value
var compensation = 3.4 // CSS compensation value
var scrollHeight = content_height - (simImage_height + (compensation
* secnavi_height));
$('#scrollThisNow').height(scrollHeight+"px");
var hassClass = $('#scrollThisNow').attr("class"); // IE7 throw an
error on this (Invalid Argument, Char: 2)
if(hassClass == undefined) {
$('#scrollThisNow').addClass("scrollMe");
}
SetRsBrowser(content_height);
}
function wresizeListener(){
$(window).bind("resize", function(){ ypos(); });
}