usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.8k stars 2.59k forks source link

dontShowAgainCookie lacks documentation #1780

Closed samsontv closed 1 year ago

samsontv commented 2 years ago

Description

There is no explanation of the dontShowAgainCookie on https://introjs.com/docs/intro/options

Expected Behavior

Clear documentation of this option. Please explain the cookie-related options in more detail. Thank you.

Actual Behavior

n/a

Errors and Screenshots (optional)

n/a

Example (recommended)

I believe this option is critical to being able to show different IntroJS on two pages. If a user selects the Don't Show Again checkbox on Page A, it prevents the different tour from showing on Page B too, which is an undesired outcome.

samsontv commented 2 years ago

OK, in testing it appears this might just be to set a cookie name and the following form in the JSON works as expected: dontShowAgainCookie: 'dontShowIntroOnPageA',
that is: OptionName: 'CookieName', Thus, in the example above, if you have an IntroJS tour on multiple pages, and wish to enable the "Don't show again" checkbox, you must use the dontShowAgainCookieoption to set a unique cookie name on each page where you're using IntroJS.

TarasMARKEVYTCH commented 1 year ago

Hello @samsontv I actually trying to use dontShowAgain option but it not working for me. I tried to put it as option "dontShowAgainCookie" and by setOption("dontShowAgain", true) but it not working anyway. Can you tell me how i can implement pls?