[jQuery] Re: binding to two events (resize and onload)

2007-05-15 Thread willwade
Ive got it - for the record: $(document).ready(resizeCols); $(window).bind('resize', resizeCols); function resizeCols() { //Get full width of central col var divWidth = $('#col-centre').width(); //now main should always be 80% and

[jQuery] Re: binding to two events (resize and onload)

2007-05-15 Thread willwade
Interesting. I get the alert now. But firebug is telling me "too much recursion" - but I cant work out where! - not sure if its anything to do with the code here! Whats odd is that the code appears to work on load but not resize (or perhaps that error is getting in the way) Thanks Will On May 1

[jQuery] Re: binding to two events (resize and onload)

2007-05-15 Thread Erik Beeson
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 <[E