hi team,
Its related to MVC query.
the current page has been designed with in the
here all the tables are defined
in JS file data loading happening.
As per the requirement we have to add a accordian in side this script tag..
if i create in any kind of normal page code is working ...if use the same code with in these tag code is not working
help me if any one know

Tuhin PaulRank #7 · 71.9K reputationPosted Mar 28, 2025, 1:02 PM EDT
The
block is not executed as regular HTML or JavaScript. Instead, it serves as a placeholder for Kendo UI to render content dynamically. When you place the accordion code inside this block, it may not initialize properly because:Initialization Timing :
Template Rendering :
JavaScript Execution :
block is treated as plain text and not executed directly. This means any accordion-specific script logic placed inside the template will not run unless explicitly invoked after rendering.Tuhin PaulRank #7 · 71.9K reputationPosted Mar 28, 2025, 1:06 PM EDT
Part -2
To resolve this, you need to ensure that the accordion is initialized after the Kendo UI template has been rendered into the DOM. Here’s how you can achieve this:
Step 1: Define the Accordion in the Template
Place the HTML structure for the accordion inside the
block. For example:Section 1 Content for section 1. Section 2 Content for section 2.Step 2: Render the Template
Use Kendo UI to render the template into the DOM. For example:
var template = kendo.template($("#my-template").html()); $("#container").html(template({}));Here,
#containeris the target element where the template will be rendered.Step 3: Initialize the Accordion
After rendering the template, initialize the accordion. Use jQuery's
.accordion()method (or the equivalent method provided by your framework) to initialize the accordion on the rendered content:$("#accordion").accordion();Tuhin PaulRank #7 · 71.9K reputationPosted Mar 28, 2025, 1:07 PM EDT
Part -3
End to End code:
Kendo Template with Accordion Section 1 Content for section 1. Section 2 Content for section 2. $(document).ready(function () { // Render the Kendo template var template = kendo.template($("#my-template").html()); $("#container").html(template({})); // Initialize the accordion $("#accordion").accordion(); });