$.css() onload

$.css() onload

Hi Guys,

I was trying to fire an $.css() during the onload event. For some reason, it does not work. It works fine if I attach it to another event such as a resize event, but not onload.

This is what I have done:



function myFunc() {

      $("#example").css({'width' : 10px;});

}

$(document).ready(function() {

      $(window).load(function() {

            myFunc();

      });

});


I need this element to be sized immediately after loading. This works if the event was anything else, but dosen't work with 'load' at all.

Please help!

Thanks[/code]