You are here

function ctools_ajax_command_before in Chaos Tool Suite (ctools) 6

Create a before command for the AJAX responder.

This will add the HTML before the specified selector.

Parameters

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

$html: The data to use with the jquery before() function.

File

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

Code

function ctools_ajax_command_before($selector, $html) {
  return array(
    'command' => 'before',
    'selector' => $selector,
    'data' => $html,
  );
}