1 ajax.inc ajax_command_remove($selector)

Creates a Backdrop Ajax 'remove' command.

The 'remove' command instructs the client to use jQuery's remove() method to remove each of elements matched by the given selector, and everything within them.

This command is implemented by Backdrop.ajax.prototype.commands.remove() defined in misc/ajax.js.


$selector: A jQuery selector string. If the command is a response to a request from an #ajax form element then this value can be NULL.

Return value

An array suitable for use with the ajax_render() function.:

See also


Related topics


core/includes/ajax.inc, line 1157
Functions for use with Backdrop's Ajax framework.


function ajax_command_remove($selector) {
  return array(
    'command' => 'remove',
    'selector' => $selector,