Is possible override a js file of a module in template? The path of js file is modules/my_module/js/file.js
Thank so much!
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityBoth the following options should be reasonably future proof so the changes survive extension and Joomla updates.
Option 1: Module Override
I don't think you can override a JavaScript file but you could create a module override as per https://docs.joomla.org/Understanding_Output_Overrides#Module_Layout_Overrides and replace the code where the JavaScript file is called with a call to an alternative JavaScript file.
Option 2: jQuery Easy
The free version of jQuery Easy can help with removing and adding scripts although it may depend on how the script is being loaded if jQuery Easy can help in this case or not.