Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom button label #147

Open
BrownSim opened this issue Aug 21, 2020 · 2 comments
Open

Custom button label #147

BrownSim opened this issue Aug 21, 2020 · 2 comments

Comments

@BrownSim
Copy link

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

@vitoria-mendes
Copy link

It's not working for me too, did you find any alternative solution?

@Robszyy
Copy link

Robszyy commented Sep 21, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants