Reputation: 600
I am using joomla. In it's template js are being called like following way-
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/javascript/cscript.js', 'text/javascript');
I just want to add tag async
to it. How should i do that..??
Upvotes: 1
Views: 1081
Reputation: 26431
You need to pass 4th param with boolean true
,
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/javascript/cscript.js', 'text/javascript', false, true);
Upvotes: 1