I've got jquery ui modal dialog working as required in joomla but I've run into another problem. I want to dynamically load the text into the dialog by accessing, in successive dialogs, elements of a js array. This array is globally declared:
Code:
var Darray = {};
Darry.array01 = [["text01", "audio01"],
....
["text10", "audio10"]];
and is accessed by:
Code:
jQuery("span.ws_dialog_icon").on("click",function(evnt) {
jQuery("div#ws_dialog").dialog("open");
.....
var tester = Darray.array01[0][0]; jQuery("div#wsd_text").text(tester.toString());
This works when the global array variable is declared in the same file as the jquery code but not if it is placed in a different file. I'm surprised as I thought global declarations applied throughout the jquery namespace.