Variable as command not working?
Hi I bet this is simple for most but it's just killing me and cant figure it out...
This is not working...
- var append = "append";
- $("#table").eval(append)( $( item.row ) );
Neither does this...
- $("#table").window["append"]( $( item.row ) );
This is working...
someVariable = 'alert';
window[someVariable]('Foo!');
How can I make the first one work? I need to pass eigher append or prepend to the command.