Hi Matt, otherwise the script doesn't work. :/








I didn't write the function, however the script is something similar to this
$(
        function(){
                function openMenu(){
                        doSomething(x);
                }
                function closeMenu(){
                        doSomething(x);
                }

        }
);



Matt Kruse ha scritto:
On Jun 26, 12:44 pm, jakiri hutimora <jakirihutim...@gmail.com> wrote:
  
Actually I really need to access to a method inside another function.
$(
        function(){
                function openMenu(){
                        doSomething(x);
                }
                function closeMenu(){
                        doSomething(x);
                }

        }
);
    

Why are you defining these functions inside $()? Just define them
outside of $() and they will be global.

function openMenu(){
   doSomething(x);
}
function closeMenu(){
   doSomething(x);
}
$(openMenu);

If you want a function to be available outside of the function scope
that is currently executing, then define it outside.

Matt Kruse

  

Reply via email to