@tim.young where should be the best way to add all js codes? inside each Layout? (what if I have like 10 or more ? Can we add all JS codes in the SETTINGS > CUSTOM HEADER/FOOTER CODE.
It is best to place JS codes on the specific pages that they apply to. If you apply them in the application’s Custom Header/Footer locations they will then apply to all pages. This could be problematic if you have JS codes that apply to specific components and or HTML/CSS code.
@SafetyUniversity is correct. It’s best to consider what pages/elements you intend to target with both JavaScript and CSS and place the code in a relevant location.
Since I’m much more familiar with CSS, I’ll use an example related to custom CSS. If you wish to modify the appearance of buttons throughout the entire application, the CSS would be placed in the Custom Header/Footer section of your app’s settings. If you wish to change the button appearance on a single form, the CSS would be placed on a single page.
For reference, this list contains everywhere you can place custom code (CSS, JavaScript, or both) in order of global effect -> highly specific