attr() public method

Access a property on the first matched element or set the attribute(s) of all matched elements
public attr ( string | array $attribute, variadic<[callable | string]> $arguments ) : Query | string
$attribute string | array attribute name or attribute list
$arguments variadic<[callable | string]>
return Query | string attribute value or $this
Example #1
0
 /**
  * Set the attribute on all selected element nodes
  *
  * @see ArrayAccess::offsetSet()
  * @see FluentDOM::attr()
  * @example properties/attr-set.php Usage: Set attribute property
  * @param string $name
  * @param string $value
  */
 public function offsetSet($name, $value)
 {
     $this->_fd->attr($name, $value);
 }