Intro.js: Implement cookies

Created on 5 Mar 2015  路  5Comments  路  Source: usablica/intro.js

It would be useful if Introjs could run only once (based on cookies).

suggestion wontfix

Most helpful comment

I'm using local storage at the moment - show_intro() is called on page load.

function show_intro() {
    if localStorage.getItem('intro_shown') {
        // already shown
        return
    }
    localStorage.setItem('intro_shown', true)
    intro = introJs()
    intro.setOptions([ ... ])
    intro.start()
}

All 5 comments

I'm using local storage at the moment - show_intro() is called on page load.

function show_intro() {
    if localStorage.getItem('intro_shown') {
        // already shown
        return
    }
    localStorage.setItem('intro_shown', true)
    intro = introJs()
    intro.setOptions([ ... ])
    intro.start()
}

https://github.com/isdaft/introjs-dropcookie-onhint

Can you verify this @afshinm @bozdoz ?

Fan of localStorage, not of cookies. I kind of think this is an implementation detail, and not something that should be built into the library.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pehuensolari picture pehuensolari  路  5Comments

ghost picture ghost  路  7Comments

Themandunord picture Themandunord  路  3Comments

stephendeo picture stephendeo  路  5Comments

cssagogo picture cssagogo  路  4Comments