This repository was archived by the owner on Nov 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 423423 </ span >
424424 </ div >
425425
426+ < div >
427+ < span tooltips
428+ tooltip-show-trigger ="click "
429+ tooltip-hide-trigger ="click "
430+ tooltip-template ="Click again to close ">
431+ Tooltip with same trigger (click) for show and hide
432+ </ span >
433+ </ div >
434+
435+ < div >
436+ < span tooltips
437+ tooltip-show-trigger ="mouseenter "
438+ tooltip-hide-trigger ="mouseenter "
439+ tooltip-template ="Mouseover again to close ">
440+ Tooltip with same trigger (mouseover) for show and hide
441+ </ span >
442+ </ div >
443+
426444 < script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.0/angular.js "> </ script >
427445 < script type ="text/javascript " src ="lib/angular-tooltips.js "> </ script >
428446 < script type ="text/javascript " src ="demo/js/index.js "> </ script >
Original file line number Diff line number Diff line change 328328 }
329329 , onTooltipShow = function onTooltipShow ( event ) {
330330
331+ if ( event && ! tooltipElement . hasClass ( 'active' ) ) {
332+
333+ event . stopImmediatePropagation ( ) ;
334+ }
335+
331336 tipElement . addClass ( '_hidden' ) ;
332337 if ( $attrs . tooltipSmart ) {
333338
448453 }
449454 }
450455 }
451- , onTooltipHide = function onTooltipHide ( ) {
456+ , onTooltipHide = function onTooltipHide ( event ) {
457+
458+ if ( event && tooltipElement . hasClass ( 'active' ) ) {
459+
460+ event . stopImmediatePropagation ( ) ;
461+ }
452462
453463 if ( $attrs . tooltipAppendToBody ) {
454464
You can’t perform that action at this time.
0 commit comments