I have global array variable so i can access it from many functions. Problem occurs when im trying to use this variable in function that is bind to button created dynamically, variable is undefined then.
var array = [[]];
$('#edit').on("click", "input[id='button']", function(){
... i can't use this variable here and i wanna to put some values:- array[index1][index2]=...
});
I even made function to get this array and assign to new variable, and i can get values that was already in this array, but i can't add new ones cause of error "can't convert undefined to object". What seems to be the problem, and how to solve that ? Maybe some workaround ?
"input[id='button']"=#button