jQuery::addOnReady PHP Method

addOnReady() public method

. })
public addOnReady ( jQuery_Chain | string $js )
$js jQuery_Chain | string
    public function addOnReady($js)
    {
        if (is_object($js)) {
            $js = $js->getString();
        }
        $this->app->template->appendHTML('document_ready', $js . ";\n");
        return $this;
    }

Usage Example

Beispiel #1
0
 function addOnReady($js)
 {
     if (is_object($js)) {
         $js = $js->getString();
     }
     if (!$this->atk4_initialised) {
         return parent::addOnReady($js);
     }
     $this->api->template->append('document_ready', "\$.atk4(function(){ " . $js . "; });\n");
     return $this;
 }
All Usage Examples Of jQuery::addOnReady