Component/Jquery.php
public function enableAutofocus()
    {
        static $enabled = false;
        
        if (!$enabled) {
            $script = "$(document).ready(function(){"
                    . "\$(this).find('[autofocus]:first').focus();"
                    . "});";
            $this->registerScript($script);
            $enabled = true;
        }
        
        return $this;
    }
public function enableAutofocus()
    {
        static $enabled = false;
        
        if (!$enabled) {
            $script = "$(document).ready(function(){"
                    . "\$(this).find('[autofocus]:first').focus();"
                    . "});";
            $this->registerScript($script);
            $enabled = true;
        }
        
        return $this;
    }
public function enableAutofocus ( ) { static $ enabled = false ; if ( ! $ enabled ) { $ script = "$(document).ready(function(){" . "\$(this).find('[autofocus]:first').focus();" . "});" ; $ this -> registerScript ( $ script ) ; $ enabled = true ; } return $ this ; }
Activate focus on elements with the attribute "autofocus"
@staticvar boolean $activated
@return $this
Activate focus on elements with the attribute autofocus