You need to sign in to do that
Don't have an account?
Niraj Singh 28
jquery in lightning component
Hi,
I am feeling more comfort in coding jquery insted javascript can i do in lightning component if then please do me clear how can import jquery api from static resources.
Thanks and Happy new year in Advance
I am feeling more comfort in coding jquery insted javascript can i do in lightning component if then please do me clear how can import jquery api from static resources.
Thanks and Happy new year in Advance
I trust you are doing splendidly and enjoying the season.
In order to use the jQuery plugin, you must include the jQuery and JavaScript file on your Lightning Component via static resources.
Component:
Controller:
Please refer to the below links which might help you further with the above requirement.
https://jennamolby.com/how-to-use-jquery-libraries-within-salesforce-lightning-components/
https://rajvakati.com/2018/05/29/using-jquery-in-lightning-components/
http://sfdcmonkey.com/2018/03/13/jquery-datatable-salesforce-lightning-component/
http://bobbuzzard.blogspot.com/2015/06/lightning-components-and-unobtrusive.html
https://gist.github.com/douglascayers/27941e99b0c18e9eb002775f5b9e4aab
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Wish you a very Happy New Year in advance :)
Thanks and Regards,
Khan Anas
https://rajvakati.com/2018/05/29/using-jquery-in-lightning-components/
Step 1: download Jquery javascript file
download the jquery latest version from the https://jquery.com/download/ .