Custom button label
BrownSim opened this issue · comments
Sim commented
Hello
This "skipButton" : {className: "mySkip", text: "SKIP"}, does not work anymore
This code https://github.com/xbsoftware/enjoyhint/blob/master/src/enjoyhint.js#L209
is executed before this one :
https://github.com/xbsoftware/enjoyhint/blob/master/src/jquery.enjoyhint.js#L994
Vitória Mendes commented
It's not working for me too, did you find any alternative solution?
Robin_prgn commented
An other solution could be to manually replace the text, it's a bit trash but kinda works.
var enjoyhint_instance = new EnjoyHint({});
var enjoyhint_script_steps = [
{
'next #button' : 'bla bla'
}
];
enjoyhint_instance.set(enjoyhint_script_steps);
enjoyhint_instance.run();
setTimeout(() => {
$('.enjoyhint_next_btn').text("NEXT");
$('.enjoyhint_prev_btn').text("PREV");
$('.enjoyhint_skip_btn').text("SKIP");
}, 400);
$(document).on('click', '.enjoyhint_next_btn', function(){
setTimeout(() => {
$('.enjoyhint_next_btn').text("NEXT");
$('.enjoyhint_prev_btn').text("PREV");
$('.enjoyhint_skip_btn').text("SKIP");
}, 400);
});
$(document).on('click', '.enjoyhint_prev_btn', function(){
setTimeout(() => {
$('.enjoyhint_next_btn').text("NEXT");
$('.enjoyhint_prev_btn').text("PREV");
$('.enjoyhint_skip_btn').text("SKIP");
}, 400);
});