This is a migrated thread and some comments may be shown as answers.

Is JQuery required for wrapper components?

1 Answer 78 Views
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 18 Dec 2020, 10:15 AM

I'm using the Menu widget but I guess this would apply to any of the Vue wrappers.

As per the docs, to access the clicked menu item it appears that $ is needed but I just get errors because $ is undefined. So my question is - do I need to manually include JQuery in order to access the item and/or is there no better way to do this? 

onSelect: function (e) {
    var currentItemText = $(e.item.firstChild).text().trim();
    console.log(currentItemText + " clicked.");
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar
Telerik team
answered on 22 Dec 2020, 08:32 AM

Hi Al,

The Kendo UI for Vue Wrappers, as it stands from their name, are Vue wrappers of the Kendo UI for jQuery components. The Kendo UI for jQuery, needs the jQuery library to operate properly. 

To answer your question, yes, you have to include the jQuery library in your project if you use the Wrapper components as Kendo UI for jQuery is not shipped with the jQuery library. 

You can open a random demo example from our Kendo UI for Vue Wrappers demos and open a selected project in StackBlitz. Open the index.html file, located in the "public" folder and you will see that the jQuery library is linked in the <head> tag.

I hope the above answers your question.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Petar
Telerik team
Share this question
or