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 |
- [jQuery] call a method outside a jquery object jasper saronno
- [jQuery] Re: call a method outside a jquery object Eric Garside
- [jQuery] Re: call a method outside a jquery objec... jakiri hutimora
- [jQuery] Re: call a method outside a jquery o... jakiri hutimora
- [jQuery] Re: call a method outside a jquery o... Matt Kruse
- [jQuery] Re: call a method outside a jque... jakiri hutimora
- (Work around Solution) Re: [jQuery] ... jakiri hutimora
- [jQuery] my first plugin, help t... jakiri hutimora