Hey, All Please let me know how we can add the JQu...
# suitecommerce
h
Hey, All Please let me know how we can add the JQuery Datatable library in SCA !! I have tried adding the library in the third-party folder but when I use Jquery.DataTable() it gives me an error :
JQuery.DataTable() is not a function
s
Do you mean to use
JQuery
and not
jQuery
?
Capitalisation is important in JavaScript
h
its not about capitalisation !! I have tried with all correct formats and datatable patches !!
I guess there is library overlaping or something like that !! soo that's why I asked you the correct method of uploading external library in SCA
There's even a section on jQuery add-ons
šŸ‘ 1
If it's SCA then you can also use shimming (also mentioned in the article)
šŸ‘ 1
m
Follow these steps: • Make sure you are using umd version of DT • I assume you're developing an extension, place it under your javascript folder • Edit the file so it should have a module name as per almond.js guidelines • Inject the DT as the dependency in your module Now use DataTables as you use to before.
šŸ‘ 1
h
Thanks @Steve Goldberg and @Mohammad Sharaf Ali !! will get back to you after trying these solutions