[jQuery] Re: Define functions before DOM loads

2009-02-19 Thread brian
Why not just define the function? function msg() { alert("Hello User"); } If you do that, it'll be available when the DOM is loaded ie. $(document).ready() On Thu, Feb 19, 2009 at 1:17 AM, JQueryProgrammer wrote: > > Got it. I need to define as > > (function() { >msg = function() { >

[jQuery] Re: Define functions before DOM loads

2009-02-18 Thread JQueryProgrammer
Got it. I need to define as (function() { msg = function() { alert("Hello User"); } })(); Thats it. On Feb 19, 11:08 am, JQueryProgrammer wrote: > How can we define functions even before the DOM loads fully. I tried > like > > (function() { >         msg = func