Small workaround to use simple jQuery “$” quotation with your custom JS

   —   
Our built-in jQuery is loaded by default, so it’s not possible to use a simple jQuery “$” quotation in version 7 with your custom JS.  Instead you need to use the noConflict() mode.
There is a small and simple workaround, which in most cases should work perfectly.  All you need to do is to reset "$" after Kentico has unset it.  To do this, you need to add the following to the top of the master page layout (top of the <body> section – this is because Kentico’s libraries are overriding this behavior in the <head> section)

<script>
 var $ = jQuery.noConflict();
</script>

-md-


See also: How to register and use the native Kentico jQuery library

Applies to: Kentico version 7.x
Share this article on   LinkedIn

Martin Danko

Let me guide you on your journey of success. I will show you how to optimize your content production with Kentico Draft. Check out www.kenticocloud.com