The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

Stepper not working from documentation


Hi, I just copied from documentation but had problems.

Following my code:

// Stepper lement
var element = document.querySelector("#kt_modal_create_app_stepper");

// Initialize Stepper
var stepper = new KTStepper(element);

// Handle next step
stepper.on("kt.stepper.next", function (stepper) {
stepper.goNext(); // go next step
});

// Handle previous step
stepper.on("kt.stepper.previous", function (stepper) {
stepper.goPrevious(); // go previous step
});


Trying code line 'stepper.on....', following exception occured:

'TypeError: stepper.on is not a function'


Tried to include

but nothing.



Thank you in advance


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Same problem here..



Hello,

same problem here.

I tried uselessly to follow the steps and I'm having the same issue.
I'm receiving the error:
TypeError: stepper.on is not a function


Being the index.js file:
// Stepper lement
var element = document.querySelector("#kt_stepper_example_vertical");

// Initialize Stepper
var stepper = new KTStepper(element);

// Handle next step

stepper.on("kt.stepper.next", function (stepper) {
stepper.goNext(); // go next step
});

// Handle previous step
stepper.on("kt.stepper.previous", function (stepper) {
stepper.goPrevious(); // go previous step
});

How can we fix that?



Hi,

Thank you for your feedback. Let us check this further and will get back to you with a solution as soon as possible.

Regards.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(