Если вы хотите придерживаться базы R, вы можете сделать что-то вроде этого:
### Get all the columns names
col <- unique(unlist(sapply(df.lst, names)))
col
## [1] "a" "b" "d" "e" "f" "g"
### Fill the missing columns with NA
df.lst <- lapply(df.lst, function(df) {
df[, setdiff(col, names(df))] <- NA
df
})
### Then Bind it
do.call(rbind, df.lst)
## a b d e f g
## A.1 1 5 2 1 1 1
## A.2 2 4 3 1 2 2
## B.1 1 3 2 NA NA NA
## B.2 2 2 3 NA NA NA
## C.1 1 4 1 1 NA NA
## C.2 2 3 2 3 NA NA
Для меня было решение обратиться к родительскому элементу цели события.
например. event.target.parentElement
$("<div class='dialog' title='" + title + "'><p>" + text + "</p></div>")
.dialog({
closeOnEscape: false,
open: function (event, ui) {
/* Hide the close button of the dialog your are loading */
$(".ui-dialog-titlebar-close", event.target.parentElement).hide();
/* Cycle through only the buttons belonging to the current dialog */
$('.ui-dialog-buttonpane', event.target.parentElement).find('button').each(function (id, el) {
debugger;
});
},
buttons: {
"Button 1": function () { doStuff; },
"Button 2": function () { doStuff; },
"Button 3": function () { doStuff; }
}
});