addOnReady() public method

. })
public addOnReady ( jQuery_Chain | string $js )
$js jQuery_Chain | string
Esempio n. 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;
 }
Esempio n. 2
0
File: jUI.php Progetto: atk4/atk4
 /**
  * Adds JS chain to DOM onReady event
  *
  * @param jQuery_Chain|string $js
  *
  * @return $this
  */
 public function addOnReady($js)
 {
     if ($js instanceof jQuery_Chain) {
         $js = $js->getString();
     }
     if (!$this->atk4_initialised) {
         return parent::addOnReady($js);
     }
     $this->app->template->append('document_ready', '$.atk4(function(){ ' . $js . "; });\n");
     return $this;
 }