If I understand your question, you want the "bh" function to be accessible outside the "document.ready" scope.
One option would be to define some global namespace, and then assign the bh method to that global namespace object. Something like: window.myNamespace = {}; $(document).ready(function(){ window.myNamespace.bh = function(){ blabla... }; }); Then, outside the scope of the ready, you can still access window.myNamespace.bh. JK -----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Friday, April 04, 2008 1:22 PM To: jQuery (English) Subject: [jQuery] Re: Func outside of doc.ready cannot access function inside doc.ready? Why not? I'm still having trouble with this. All of my code is already written inside the doc.ready function. The code which needs to be located outside of the doc.ready function HAS to be able to call code within the doc.ready body. I'd be GREATLY in debt to anyone who could help me resolve this issue. Here's a sample of my code: <script type="text/javascript"> <!-- FDMSLibrary.load("FDMSBridge.swf", initBlazeDSCode); function initBlazeDSCode() { alert('blaze ready'); consumer.addEventListener("message", messageHandler); } function messageHandler(e) { alert('got the message'); } //--> </script> <script type="text/javascript"> <!-- $(document).ready(function(){ bh = function() { return { runMeNow: function () { alert('runMeNow'); } } } }); //--> </script>