Example #1
0
 public function open($ready = true)
 {
     $this->ready = $ready;
     $script = "";
     $script .= Import::script('jquery', true);
     $script .= "<script type=\"{$this->type}\">" . eol();
     if ($this->ready === true) {
         $script .= "\$(document).ready(function()" . eol() . "{" . eol();
     }
     return $script;
 }
Example #2
0
 public function open($ready = true, $jqueryCdn = false, $jqueryUiCdn = false)
 {
     $this->ready = $ready;
     $eol = eol();
     $script = "";
     if ($jqueryCdn === true) {
         $script .= Import::script('jquery', true);
     }
     if ($jqueryUiCdn === true) {
         $script .= Import::script('jqueryUi', true);
     }
     $script .= "<script type=\"{$this->type}\">" . $eol;
     if ($this->ready === true) {
         $script .= "\$(document).ready(function()" . $eol . "{" . $eol;
     }
     return $script;
 }