Drupal 8  8.0.2
CssCommand Class Reference
Inheritance diagram for CssCommand:

Public Member Functions

 __construct ($selector, array $css=array())
 setProperty ($property, $value)
 render ()
- Public Member Functions inherited from CommandInterface
 render ()
 __construct ($selector)
 render ()

Protected Attributes

 $css = array()
- Protected Attributes inherited from CommandInterface

Detailed Description

An AJAX command for calling the jQuery css() method.

The 'css' command will instruct the client to use the jQuery css() method to apply the CSS arguments to elements matched by the given selector.

This command is implemented by Drupal.AjaxCommands.prototype.css() defined in misc/ajax.js.

See Also

Constructor & Destructor Documentation

__construct (   $selector,
array  $css = array() 

Constructs a CssCommand object.

string$selectorA CSS selector for elements to which the CSS will be applied.
array$cssAn array of CSS property/value pairs to set.

Member Function Documentation

render ( )

Implements Drupal:render().

setProperty (   $property,

Adds a property/value pair to the CSS to be added to this element.

$propertyThe CSS property to be changed.
$valueThe new value of the CSS property.

The documentation for this class was generated from the following file: