You are here

function ctools_ajax_command_attr in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 includes/ajax.inc \ctools_ajax_command_attr()

Set a single property to a value, on all matched elements.

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.

File

includes/ajax.inc, line 94
Set this so we can tell that the file has been included at some point.

Code

function ctools_ajax_command_attr($selector, $name, $value) {
  ctools_add_js('ajax-responder');
  return array(
    'command' => 'attr',
    'selector' => $selector,
    'name' => $name,
    'value' => $value,
  );
}