xezus Posted March 24, 2013 Share Posted March 24, 2013 Hi, I am building my first theme and I am adding small js codes for diffrent parts of the theme, but I don't know where is the best place to put them because of performance. I put them into new created separated js, but I don't know if this is the best way to do that. Is here something like global.css for js? Link to comment Share on other sites More sharing options...
math_php Posted March 24, 2013 Share Posted March 24, 2013 Hi xezus, I am currently fixing themes with js problems. If I made a theme, I would also make a real small module that would only load js at the good time in hookHeader. This way you can use Prestashop, addJs, addJquery, addJqueryPlugin, addCss. Prestashop will then work to load only one time each js you need. I am fixing theme where several jquery,easing and plugin version are loaded without care.Mixing minified version, with not minified and even older version. Making a module will also permit to ask your customer for settings. Regards Link to comment Share on other sites More sharing options...
xezus Posted March 24, 2013 Author Share Posted March 24, 2013 Nice solution, thank a lot math_php. 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