Fuel UX - Capture Wizard Change Events

According to the documentation , I should be able to connect to a component change event of the Fuel UX wizard. But for my life I can’t figure out how to do this. I'm still new to jquery and javascript.

Javascript I tried the following

var wizard = $('#MyWizard'); wizard.on('change', '.wizard', function () { alert('OH SNAP!'); }); wizard.wizard().on('change', function () { alert('OH SNAP!'); }); 

... and several other success options.

I think I messed up the basics somewhere. How do I add the addition of a custom event to the on change event. (as an id, to have only one content area, but in the identifier of the change event, for example, so that the server provides me with the necessary content to fill in each step of the wizard)

+6
source share
2 answers

It hurt close to what I needed to do.

  var wizard = $('#MyWizard'); wizard.on('change', function (e, data) { console.log('change'); }); wizard.on('changed', function (e, data) { console.log('changed'); }); 
+7
source

At first, myWizard is not a MyWizard element. The second DIV elements do not have a change event. You can simply add a click event to your buttons, for example:

 <button class="btn btn-mini btn-prev" disabled="disabled" id="prev"><div class="icon-arrow-left"></div>Prev</button> 

and then:

 $('#prev').click(function () { alert('OH SNAP!'); }); 
0
source

Source: https://habr.com/ru/post/943546/


All Articles