function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amay Trivedi 10Amay Trivedi 10 

Is it advisable to use jquery library in lightning component?Please provide reasons too.

Is it advisable to use jquery library in lightning component?Please provide reasons too.
Shruti SShruti S
Yes, absolutely you can if needed. There are lot of things that jQuery does and that Lightning Component Framework doesn't provide out of the box. We have to aggree with the fact that simple DOM Manipuation and DOM Querying can be achieved using $A but complex implementations such as say drag-and-drop, other UI Animations etc will require jQuery for sure. It will be lot of JavaScript in case if you try to implement such features without well tested libraries like jQuery.

Recently I even wrote a blog where I built a Kanban Board using Lightning Component and jQuery UI. The role of jQuery was indispensable. Have a look - https://shrutisridharan.wordpress.com/2018/06/15/kanban-using-lightning-components/.

So I still believe, with the advent of Lightning Components, jQuery is still not going away but you can avoid for simple use cases as the Platform provides routines or functions for the same already.