Don't know if I'm being blind but every time I look at this code the logic makes sense. I am trying to iterate through this for loop and for each iteration generate a dialog box with the ID of #dialog-(i) but it only show's the last iteration of 200. The code is below:
var i;
for(i=1;i<200;i++){
$("#dialog-" + i).hide();
$('#meetings_box-' + i).click(function() {
var dialog = $("#dialog-" + i).dialog();
if (dialog) {
console.log('yay');
console.log(dialog);
} else {
console.log('nay');
}
});
};
Any help to finding the issue, probably something really dumb