Maybe try:
$(document).ready(resizeCols); $(window).bind('load', resizeCols); Or maybe you're getting a javascript error in one of the lines before the alert that's causing it to halt. Check the firebug console or try adding an alert at the top of the function. --Erik On 5/15/07, willwade <[EMAIL PROTECTED]> wrote:
Hi there I have a wacky fix to the age old problem of fluid column widths (a table would do of course). It involves using jquery to calculate the sizes of my columns - the splitter code is a bit over the top for my needs. So I have some simple code but I can't seem to get it to work. $(document).bind("ready", resizeCols); $(document).bind("resize", resizeCols); function resizeCols() { //Get full width of central col var divWidth = $('#col-centre').width(); //now main should always be 80% and side 205px mainWidth = divWidth - 205; alert(mainWidth); $('#main-content').width(mainWidth); } The alert doesn't show at all and Im not entirely sure why - I don't get any errors showing up. My guess is that Im binding wrong - any suggestions? Thanks Will