flobrflo Posted April 3, 2014 Share Posted April 3, 2014 Hi i would like to use a script using jquery-ui lib on FrontController. I download the script so don't know which part of the lib use, so i would like to know how import jquery-ui. i try: $this->context->controller->addJS('http://code.jquery.com/ui/1.10.4/jquery-ui.min.js'); //or v3 or v2... but i got the error: Error: cannot call methods on autocomplete prior to initialization; attempted to call method 'http://mydomain.com/index.php?controller=search if i remove jquery-ui, error desappear, and if i had jquery-ui on other front page error appear. But don't have the error on admin. (maybe cause the blocksearch is only on Front? xD) Any idea? =) Link to comment Share on other sites More sharing options...
flobrflo Posted April 3, 2014 Author Share Posted April 3, 2014 Little update, when i desactivate blocksearch, the error desappear. So have i to change order of script declartion? can i change it with addJS(...)? Link to comment Share on other sites More sharing options...
theillo Posted December 14, 2016 Share Posted December 14, 2016 Anyone found a solution yet? Shouldn't be too hard to use a library in your module.... Link to comment Share on other sites More sharing options...
theillo Posted December 14, 2016 Share Posted December 14, 2016 Here's what got jquery at least into the header when I have this in my module code public function hookHeader() { $this->context->controller->addJqueryUI('ui.core'); $this->context->controller->addJqueryUI('ui.widget'); $this->context->controller->addJqueryUI('ui.mouse'); $this->context->controller->addJqueryUI('ui.slider'); $this->context->controller->addJS($this->_path.'/js/front.js'); $this->context->controller->addCSS($this->_path.'/css/front.css'); } But it's still not working Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now