views:

246

answers:

1

I'm doing some experiments with jquery n widths for a liquid column and I'm not sure why it isn't working on firefox. It works fine on IE6,7,8 Chrome, Opera(sluggish). I found some articles about firefox not recognizing the .resize attribute but no explanation/solution =\

$(document).ready(function(){
$(midCol).width((window,$(window).width()) - 470)
 $(window).resize(function(){$(midCol).width((window,$(window).width()) - 470)
})
});
+1  A: 

Update: Your problem is with your selector, simply change it to $('#midCol') to get the desired effect:

$(document).ready(function(){
    $('#midCol').width($(window).width() - 470)
    $(window).resize(function() {
        $('#midCol').width($(window).width() - 470)
    })
}); 

What version of Firefox are you using? I can't seem to reproduce resize() not working in Firefox (3.6.3). I suggest trying a simple demo page for the resize method and see if you're still having problems. If this example works, then your problem likely lies elsewhere and you'll need to include some more info.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
    <script type="text/javascript">
        $(document).ready(function() {
            $(window).resize(function() {
                $('#log').append('<div>Handler for .resize() called.</div>');
            });
        });
    </script>
</head>
<body>
    <div id="log"></div>
</body>
</html>
wsanville
huh, I thought I had the last firefox. Mine is 3.5.9. I'll download the new one immediately. =\I have a test page running on my dropbox. http://dl.dropbox.com/u/3359906/cballenar.wordpress/hybridlayout.jquery/index.html
LM35DT
darn... i didn't see that.Thanks!
LM35DT