close()

Since: Editor 1.0

Close the form display.
Please note - this property requires the Editor extension for DataTables.

Description

This method will 'close' the editing from - that is, it will be removed from the display and the user will no longer be able to interact with the form, until it is made visible again.

This is the inverse of the open() method, although note that while open() will display the primary editing form, this method will remove all three editing modes (main form, bubble() and inline()) from the display - acting on whichever one is currently active.

Type

close()

Simply closes the current form display (regardless of if the displayed form is the main form, a bubble() or inline() form).

Returns:

DataTable.Editor: Editor instance

Example

Close the form after 5 seconds:

var editor = new DataTable.Editor({
	ajax: 'php/index.php',
	table: '#example',
	fields: [
		{
			label: 'Name:',
			name: 'name'
		}
	]
});

editor.open();

// This is obviously a fairly redundant thing to do, but it does show how
// `close()` can be used
setTimeout(function () {
	editor.close();
}, 5000);