bubble()

Since: Editor 1.3

Activate bubble editing.
Please note - this property requires the Editor extension for DataTables.

Description

Editor's bubble editing mode is designed for rapid editing for single, or a small number number of fields, very similar to the inline() editing option, but displayed floating over the table, rather than disrupting the flow of the table by inserted elements which might cause the display to change, particularly if you are using a complex field such as a WYSIWYG input.

Bubble editing provides all of the standard form options that Editor's main editing forms also offer through the form-options configuration object.

Type

bubble( nodes [, fieldNames ] [, show ] [, opts ] )

Activate Editor's bubble editing for one or more fields.

Parameters:

Returns:

DataTable.Editor: Editor instance

Examples

Bubble editing on click of a cell in a DataTable:

$('#myTable').on('click', 'tbody td', function () {
	editor.bubble(this);
});

Bubble editing with automatic submit on background click (through form options):

$('#myTable').on('click', 'tbody td', function () {
	editor.bubble(this, {
		submitOnBlur: true
	});
});

Edit multiple fields in a bubble (click on first column in a table):

$('#myTable').on('click', 'tbody td:first-child', function () {
	editor.bubble(this, ['first_name', 'last_name']);
});

Standalone bubble editing on click:

// Select all elements with a `data-editor-field` attribute
$('*[data-editor-field]').on('click', function () {
	editor.bubble(this);
});