Intro.js: Urgent Problem with hints in SPA

Created on 25 Mar 2016  Â·  14Comments  Â·  Source: usablica/intro.js

When changing routes in SPA's hints stays on the window but every thing is changed.
I think having somthing like: introjs().removeHints() could solve the issue.

Most helpful comment

I saw you changes
I have tested introJs().refresh(); but nothing changed. the hint element is no longer on page but the circles are showing.
I think we need to remove old hints so a removeHints function is a better solution.
something like exit() for intro.
is there any?

All 14 comments

I did some tricks and failed, I think it needs a public function.

Can you please prepare an online demo for this issue? a jsfiddle maybe

On Tue, Mar 29, 2016 at 3:05 PM, Babak Niknia [email protected]
wrote:

I did some tricks and failed, I think it needs a public function.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/usablica/intro.js/issues/564#issuecomment-202909208

I'm using Meteor so jsfiddle is not possible. I need to be able to remove hits manually by code, then I can use this function in my routing changes.

@afshinm
https://jsfiddle.net/0xbxmvu2/2/

the thing is one can't hide unused hints and show new hints.

@tonyspb Yes this is exactly my problem.

ah I see. will apply a new patch today/tom and release v2.0.1.

guys @babnik63 @tonyspb, I've added a refresh function for hints that re-arranges all hints.
Do you think this can help you?

Hi,
I think we can call this Refresh while changing routes or any thing else.
BUT: the refresh function should not do anything if the hint is not active and called before. the refresh function is not the showhint() function

I saw you changes
I have tested introJs().refresh(); but nothing changed. the hint element is no longer on page but the circles are showing.
I think we need to remove old hints so a removeHints function is a better solution.
something like exit() for intro.
is there any?

@afshinm what is you idea about the above comment?

hey @babnik63. I added "hideHint" function to the public api last night. could you please check this and lmk if it is the one you are looking for?

Dear Afshin
hideHint() needs stepid, but I need something to call and remove all active hints.
this is my suggested code:
`function _hideAllHints() {
_removeHintTooltip.call(this);
var hint = this._targetElement.querySelectorAll('.introjs-hint');

    if (hint) {
        var i;
        for (i = 0; i < hint.length; i++) {
            hint[i].className += ' introjs-hidehint';
        }

    }


};`

Thanks

thanks @babnik63. will add this for v2.2.0.

done @babnik63

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandernst picture alexandernst  Â·  5Comments

namgiang picture namgiang  Â·  6Comments

ethaniel picture ethaniel  Â·  6Comments

cssagogo picture cssagogo  Â·  4Comments

amanshu-kataria picture amanshu-kataria  Â·  9Comments