I am trying to create an array, assign it to a div element, press () a value and get it again at a later stage.
Can someone tell me what I am missing ...:
// set Array // $(this) is the HTML-element which should get array assigned var stack = [], stack.push('#'+$(this).find(':jqmData(role="page")').attr('id')), $(this).data( stack );
Using
console.log( $(this).data(stack) );
I am returning the entire HTML element as well
console.log( $(this).data(stack[0] OR stack.length) );
does not work.
How can I access the elements that I (presumably ...) are placed in an array?
source share