Avatar of tonelm54
 asked on

Call function as array

Im trying to call a function from an array value, I thought I could assign it by:-
var defaults = {
            'afterClose' : function () { alert("Not Declared"); }

Open in new window

And then call it like:-

Open in new window

However doesnt seem to work. Does anyone know how I can call functions stored as variables in an array?

Ive uploaded what Im trying to do to jsFiddle at http://jsfiddle.net/EcvKj/, as you can see Ive not really done much on it yet, its just to get my ideas down and possibly working.

Thanks in advance for any support any one can provide.

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.