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

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

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
http://docs.jquery.com/CSS/css#properties

Constructor & Destructor Documentation

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

Constructs a CssCommand object.

Parameters
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,
  $value 
)

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

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

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