I have a system that uses some frameworks. This framework has a function named addScript( $path )
and uses this function to load javascripts.
public function addScript( $path ){
$this->_jsFiles[$path] = $path;
}
//Or either this one
public function addScript($script) {
$this->scripts[md5($script)] = $script;
}
How I call the method is below;
$helper->addScript( 'javascript/jquery/jquery-2.1.1.min.js' );
I know how to load javascripts asyn. with using tag.
<script async type="text/javascript" src="javascript/jquery/jquery-2.1.1.min.js"></script>
I am not quite familiar using PHP to load javascripts, is it possible to load scripts asynchronously with using these functions?