K
K Viltersten
When i'm using the following, everything works well.
butt1.on ('click', function () {sameStuff ('1')});
butt2.on ('click', function () {sameStuff ('2')});
Now, i wish to compact it into one call, instead of two anonymous
functions. The problem is that i'm required to send in a function as the
second parameter. If i use the following i get only a return back, not
typed as function.
butt1.on ('click', function ('1'));
How can i enter as the second parameter BUT with a specified parameter in
it? Is it doable at all?
butt1.on ('click', function () {sameStuff ('1')});
butt2.on ('click', function () {sameStuff ('2')});
Now, i wish to compact it into one call, instead of two anonymous
functions. The problem is that i'm required to send in a function as the
second parameter. If i use the following i get only a return back, not
typed as function.
butt1.on ('click', function ('1'));
How can i enter as the second parameter BUT with a specified parameter in
it? Is it doable at all?