Page 1 of 1

problem with addstyle and addscript

Posted: Sun Aug 30, 2015 6:59 pm
by red-code
i have already make a module
when i tried to add a function addstyle into my controller in (catalog/controller/module/mymodule.php)
it doesn't work
and i tried to add it in common header it work

and my code is

$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');



what is the requirement to this function work ?

Re: problem with addstyle and addscript

Posted: Thu Sep 12, 2024 8:06 am
by kodomoyeh
In my case , I noticed that
$data['header'] = $this->load->controller('common/header');
should be written after AddScript
hope this helps.