locked
SPFX Jquery UI Accordion error RRS feed

  • Question

  • I am build the web part with Jquery UI Accordion, but after running gulp serve, it's throwing this error message:

    $("...")..accordion() is not a function, this is the code snippet I'm using, I just followed the code demo from official:

    public render(): void {
    
        this.domElement.innerHTML = MyAccordionTemplate.templateHtml;
    
        const accordionOptions: JQueryUI.AccordionOptions = {
          animate: true,
          collapsible: false,
          icons: {
            header: 'ui-icon-circle-arrow-e',
            activeHeader: 'ui-icon-circle-arrow-s'
          }
        };
    
        jQuery('.accordion', this.domElement).accordion(accordionOptions);
      }
    Anyone can help to see if there is any error .

    Monday, July 20, 2020 6:51 AM

Answers

All replies