File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 423
423
</ span >
424
424
</ div >
425
425
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
+
426
444
< script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.0/angular.js "> </ script >
427
445
< script type ="text/javascript " src ="lib/angular-tooltips.js "> </ script >
428
446
< script type ="text/javascript " src ="demo/js/index.js "> </ script >
Original file line number Diff line number Diff line change 328
328
}
329
329
, onTooltipShow = function onTooltipShow ( event ) {
330
330
331
+ if ( event && ! tooltipElement . hasClass ( 'active' ) ) {
332
+
333
+ event . stopImmediatePropagation ( ) ;
334
+ }
335
+
331
336
tipElement . addClass ( '_hidden' ) ;
332
337
if ( $attrs . tooltipSmart ) {
333
338
448
453
}
449
454
}
450
455
}
451
- , onTooltipHide = function onTooltipHide ( ) {
456
+ , onTooltipHide = function onTooltipHide ( event ) {
457
+
458
+ if ( event && tooltipElement . hasClass ( 'active' ) ) {
459
+
460
+ event . stopImmediatePropagation ( ) ;
461
+ }
452
462
453
463
if ( $attrs . tooltipAppendToBody ) {
454
464
You can’t perform that action at this time.
0 commit comments