I've got a callback function written for the onbeforechange method. Below is the code:
introJs().onbeforechange(function() {
if($(this).is(":visible") != true)
if($(this).is("ui-tabs-panel") == true)
$('.ui-tabs-nav a[href$="' + $(this).attr('id') + '"]').click();
else
$(this).show();
}).start();
The logic is correct (tested without calling introJs().start()) however, this callback function still doesn't get called before the next step. Any ideas?
I've got a callback function written for the onbeforechange method. Below is the code:
introJs().onbeforechange(function() {
if($(this).is(":visible") != true)
if($(this).is("ui-tabs-panel") == true)
$('.ui-tabs-nav a[href$="' + $(this).attr('id') + '"]').click();
else
$(this).show();
}).start();
The logic is correct (tested without calling introJs().start()) however, this callback function still doesn't get called before the next step. Any ideas?
Share Improve this question asked Jun 20, 2013 at 13:47 BrandonBrandon 1031 gold badge5 silver badges11 bronze badges 1- Btw, I've updated my intro.js file manually with the fix for onbeforechange (wasn't getting the correct element to call the function on) – Brandon Commented Jun 20, 2013 at 13:52
1 Answer
Reset to default 5Change position start()
introJs().onbeforechange(function(targetElementId) {
alert("after new step");
switch($(targetElementId).attr("data-step")) {
case "1": doSomething1(); break;
case "2": doSomething2(); break;
case "3": doSomething3(); break;
}
}).start();
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745206376a4616612.html
评论列表(0条)