New to Kendo UI for jQuery? Download free 30-day trial

When Creating Multiple Widgets Only One of Them Works

Environment

Product Progress® Kendo UI® for jQuery
Kendo Version 2017.2.621

Description 

When creating multiple widgets, only one of them works.

Cause

The issue will arise if two or more widgets are initialized from elements that have the same IDs. jQuery will find only the first one every time it searches for it and thus try to initialize the first element in the DOM multiple times.

Solution

Specify a unique ID for each element on the page.

<textarea id="editor"></textarea>
<textarea id="editor"></textarea>
<script>
    $('#editor').kendoEditor();
    $('#editor').kendoEditor(); // problem
</script>
In this article