Question about a data object for jquery each method...
Is it possible to store a function into a data object for the jquery each method like this...
-
$.each([
{keypress: 65, mcall:
x()-player.speed},
....
....
....
], function(i, obj) {
//Do something with keypress and mcall
});
I'm learning to put strings and numbers for the value of mcall, but I have a situation where I need to place a custom function x() minus a javascript object player.speed. Is that ok for mcall or is there another way to write this?
Thanks!
*Break through the ice and never look back*