usablica / intro.js

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

Do not show tooltip #345

Closed jerfeson closed 5 years ago

jerfeson commented 10 years ago

how to not show tooltip, if not find the id?

jerfeson commented 10 years ago

on line 95 put this condition
if(floatingElementQuery != null){ ... } this solved my problem, but I do not know if it's the correct way to do it, and it does not show the tooltip if the value is coming null

connyay commented 10 years ago

@jerfeson So you'd like to totally skip steps if the element isn't on the page? or would you like to use a 'floating' tooltip if the element isn't found?

jerfeson commented 10 years ago

I have a PHP validation, which checks whether a parameter is marked or not and displays an input screen, input that uses the introjs, and even with the id not being presented in the code it shows ma top of the balloon, the change I made the library so that if this element does not exist on the screen that he jumped paso introduction.

connyay commented 10 years ago

I think defining the tour via data-* attributes should take care of this for you. If you really wanted to make a change in intro.js I think this would be the right way to do it.

jerfeson commented 10 years ago

this could not be applied as a solution. in my application inputs are generated dynamically change the framework would be unnecessary work

I put the condition that partially solved my problem if(floatingElementQuery != null) {...}