public function addClass($className)
    {
        $existingClasses = !empty($this->attributes['class'])
            ? explode(' ',$this->attributes['class'])
            : array();
        $existingClasses[] = $className;
        $this->attributes['class'] = implode(' ', array_unique($existingClasses));
    }
public function addClass($className)
    {
        $existingClasses = !empty($this->attributes['class'])
            ? explode(' ',$this->attributes['class'])
            : array();
        $existingClasses[] = $className;
        $this->attributes['class'] = implode(' ', array_unique($existingClasses));
    }
public function addClass ( $ className ) { $ existingClasses = ! empty ( $ this -> attributes [ 'class' ] ) ? explode ( ' ' , $ this -> attributes [ 'class' ] ) : array ( ) ; $ existingClasses [ ] = $ className ; $ this -> attributes [ 'class' ] = implode ( ' ' , array_unique ( $ existingClasses ) ) ; }
Add a CSS class jQuery style

@author Dieter Raber, <dieter@taotesting.com>
@param string $className
Add a CSS class jQuery style