Code Monkey home page Code Monkey logo

Comments (6)

asaskevich avatar asaskevich commented on July 18, 2024

Is there any difference between next and skip styles? I think that now EnjoyHint works well and some style rules just deprecated. Thanks for the issue, we will check it in short time.

from enjoyhint.

zepojo avatar zepojo commented on July 18, 2024

According to the CSS, the skip style is supposed to pin the button in the bottom-right corner.
Having the right class for the skip button would also allow to easily retrieve it through a jQuery selector, to customize it for exemple (even if a proper way to do that would be to give access to some customization options of this button in the library).

from enjoyhint.

asaskevich avatar asaskevich commented on July 18, 2024

I fully agree about style customization. But about button's location.... Locations of the buttons are hardcoded inside library, because some users likes to see buttons near each other. In your opinion, maybe better to pass location of that button to the constructor?

from enjoyhint.

zepojo avatar zepojo commented on July 18, 2024

I guess the ideal would be to allow the user to customize the buttons (skip and next) the way he wants (style, location, text).
I'm not a javascript expert so I wouldn't really know what would be the best way to do that, but it could be by setting custom classes and text value through the constructor config hash for exemple.

from enjoyhint.

blackazaru avatar blackazaru commented on July 18, 2024

Hi, at the moment the button control is implemented. It will be possible either hide or display the buttons. The user will be able to do it himself. We will add it to github today or tomorrow.

from enjoyhint.

Amedrr avatar Amedrr commented on July 18, 2024

Bug is still present.

Issue is in EnjoyHint::clear() function and appears when that.nextUserClass is undefined due to wrong async execution order.

$(".enjoyhint_next_btn").removeClass(that.nextUserClass);

If that.nextUserClass === undefined, removeClass() cleans up entire element class and flushes next/skip buttons.

Following extra check makes it work perfectly:

$(".enjoyhint_next_btn").removeClass(that.nextUserClass || '');
$(".enjoyhint_skip_btn").removeClass(that.skipUserClass || '');

Feel free to make a commit.
Regards,
-- Alexander

from enjoyhint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.