Aleš Sýkora / July 3, 2019 / 0 comments

Best practise for jQuery in Toolset

Post summary: Let me explain best practices for using jQuery inside a View, Form or Content Template’s JS panel.

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 "$"
});

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts