最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Fuel UX - Hook onto change event of wizard - Stack Overflow

programmeradmin0浏览0评论

According to the documentation, I should be able to hook onto the change event of the Fuel UX wizard ponent. But for the life of me I cant figure out how. I'm still new-ish to jquery and javascript.

Javascript I've tried the following

var wizard = $('#MyWizard');

wizard.on('change', '.wizard', function () {
    alert('OH SNAP!');
});

wizard.wizard().on('change', function () {
    alert('OH SNAP!');
});

... and a few other variations to no success.

I think I'm messing up the basics somewhere. How would i go about adding a custom event to the on change event. (as id like to only have one content area, but on the change event id like to have the server provide me with the required content to fill each wizard step)

According to the documentation, I should be able to hook onto the change event of the Fuel UX wizard ponent. But for the life of me I cant figure out how. I'm still new-ish to jquery and javascript.

Javascript I've tried the following

var wizard = $('#MyWizard');

wizard.on('change', '.wizard', function () {
    alert('OH SNAP!');
});

wizard.wizard().on('change', function () {
    alert('OH SNAP!');
});

... and a few other variations to no success.

I think I'm messing up the basics somewhere. How would i go about adding a custom event to the on change event. (as id like to only have one content area, but on the change event id like to have the server provide me with the required content to fill each wizard step)

Share Improve this question edited May 25, 2017 at 7:05 Rohan Büchner asked Apr 24, 2013 at 14:23 Rohan BüchnerRohan Büchner 5,4035 gold badges65 silver badges106 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

I was painfully 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');
 });

First there is no myWizard just a MyWizard element. Second DIV elements have no change event. You just can add an click event to your buttons like:

<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)

  1. 暂无评论