javascript - Angular Tour directive issues -


i have used below tour directive.

<tour step="currentstep"                      <span tourtip="few more steps go."                           tourtip-next-label="close"                           tourtip-placement="bottom"                           tourtip-offset="80"                           tourtip-step="0">                     </span> </tour> 

this tour directive

q 1: how can make whole item click able ? in other words if user clicks ,it should open popup or that.

q 2: clicking anywhere on page should close tour item if open ?

any highly appreciated.

you utilize ng-if directive in collaboration custom directive (i've called toggler) set value on ng-if depends accordingly needs, example:

<tour toggler step="currentstep"      <span ng-if="open" tourtip="few more steps go."         tourtip-next-label="close"         tourtip-placement="bottom"         tourtip-offset="80"         tourtip-step="0">     </span>  </tour> 

when click on tour element toggler directive set open value true , when clicks anywhere besides tour element open value set false making ng-if directive hide element. here's plunker implementation.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -