jQuery::addInclude PHP 메소드

addInclude() 공개 메소드

Locate javascript file and add it to HTML's head section.
public addInclude ( string $file, string $ext = '.js' )
$file string
$ext string
    public function addInclude($file, $ext = '.js')
    {
        return $this->addStaticInclude($file, $ext);
    }

Usage Example

예제 #1
0
파일: jUI.php 프로젝트: samratcis/atk4
 function addInclude($file, $ext = '.js')
 {
     if (strpos($file, 'http') === 0) {
         parent::addOnReady('$.atk4.includeJS("' . $file . '")');
         return $this;
     }
     $url = $this->api->locateURL('js', $file . $ext);
     if (!$this->atk4_initialised) {
         return parent::addInclude($file, $ext);
     }
     parent::addOnReady('$.atk4.includeJS("' . $url . '")');
     return $this;
 }