Tag Archives: jQuery

WordPress $ is not defined even if jQuery is loaded

Many times while using WordPress, if we try to use "e;$” to access jQuery, we get an error the "e;$ is not defined”. This happens because the jQuery library which is included in WordPress loads in "e;no conflict” mode. In the no conflict mode jQuery returns the control of "e;$”, and it is no longer accessible as function, variable or alias for jQuery. WordPress does this in order to prevent compatibility problems with other JavaScript libraries that can be loaded. To solve this we can use "e;jQuery” instead of "e;$”. So, instead of using the standard code with "e;$” we can use the following code, which uses "e;jQuery” instead of "e;$” If you want to use the default "e;$” symbol,…

Continue Reading
Contact Us
  • Tencent AI Lab, Shenzhen, China
  • cshzxie [at] gmail [dot] com