(Work around Solution) Re: [jQuery] Re: call a method outside a jquery object

2009-06-28 Thread jakiri hutimora
Hi everybody, I have solved the problem here illustrated  "call a method outside a jquery object" with a different approach. I just defined a plug-in function and I have called the "public method" from autside using the following syntax $.myPluginName.myMethod(); I am not sure it is an

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread jakiri hutimora
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(){

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread Matt Kruse
On Jun 26, 12:44 pm, jakiri hutimora wrote: > Actually I really need to access to a method inside another function. > $( > function(){ > function openMenu(){ > doSomething(x); > } > function closeMenu(){ >

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread jakiri hutimora
Hi Eric, Sorry I said a lot of nonsense before (and maybe I am still doing it)... so please don't consider my previous mail. one function [SlideMenu.js] contains several methods to animate and manage a slide menu. I would like to open the slide menu when a particular condition it happens. (1

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread jakiri hutimora
Thanks Eric, Actually I really need to access to a method inside another function. I created a simple example however my aim is calling a "public method" (let me use public) that has been defined inside a function like that $(         function(){                 function openMenu(){        

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread Eric Garside
Long story short, you can't do what you're trying to do. You have some massive scoping issues. first, anything within you document.ready function (as defined by $(funciton(){..});) that gets declared in there is accessible only inside that function itself. Now, I'm not sure what you're actually t