none
Use JQuery in Sharepoint Online Web Part RRS feed

  • Question

  • Hi,

    im stuck iwth using jquery in a web part for Sharepoint Online 2013.

    I followed the instructions at this page : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/basics/add-an-external-library (loading a script from a CDN)

    But i don't think jquery is correctly loaded, i cannot use it even in my file part.ts or in console with chrome ?

    I created my project following this tutorial : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part

    Thank you !


    Friday, October 20, 2017 12:31 PM

All replies

  • Hi,

    We can also use the native ModuleLoader class and loadScript function to load the jQuery in web part.

    Here is a blog for your reference:

    Building SharePoint Framework Client Side Web Parts using jQuery and jQuery plugins from CDN

    https://blog.mastykarz.nl/sharepoint-framework-client-side-web-parts-jquery-plugins-cdn/

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, October 23, 2017 7:47 AM
    Moderator
  • Hi,

    Would you please provide us with an update on the status of your issue?

    If my reply help you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, November 7, 2017 9:04 AM
    Moderator