Best practise for jQuery in Toolset
Author: Aleš Sýkora, 3. 7. 2019
Let me explain best practices for using jQuery inside a View, Form or Content Template's JS panel.
- Always wrap your jQuery code in a document ready handler,
- Always use "jQuery" instead of "$" unless you know what you're doing.
Example:
jQuery(document).ready(function(){
// add your code here using "jQuery" instead of "$"
});