Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > jQuery $ View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/22/2013 3:41:46 AM
   
jQuery $
I'm using jQuery, but I can't use $ because Kentico deactivate it somehow. Where can I choose that Kentico do not do it?

User avatar
Certified Developer 13
Certified Developer 13
kentico_josefd - 4/22/2013 3:56:39 AM
   
RE:jQuery $
Hello,

There is no way to disable this in Kentico CMS, but this simple fix will ensure your custom jQuery works with the native Kentico library.

Regards,
Josef Dvorak

User avatar
Certified Developer 13
Certified Developer 13
alen@endora.hr - 4/25/2013 7:08:31 AM
   
RE:jQuery $
Hello pavel,

You could also wrap your custom javascript code into a IIFE (Immediately invoked function expression), which is as far as i know generally considered to be good practice.
(function($){
/*
your code here
*/
})(jQuery)