WORDPRESS - Oxygen - toolset

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.

  1. Always wrap your jQuery code in a document ready handler,
  2. 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 "$"
});