You are here

function ctools_ajax_command_data in Chaos Tool Suite (ctools) 6

Create a data command for the AJAX responder.

This will attach the name=value pair of data to the selector via jquery's data cache.

Parameters

$selector: The CSS selector. This can be any selector jquery uses in $().

$name: The name or key: of the data attached to this selector.

$value: The value of the data. Not just limited to strings can be any format.

File

includes/ajax.inc, line 363
Utilize the CTools AJAX responder.

Code

function ctools_ajax_command_data($selector, $name, $value) {
  return array(
    'command' => 'data',
    'selector' => $selector,
    'name' => $name,
    'value' => $value,
  );
}