Browse Source

DIV-1142: Make some tooltips visible on hover instead of click

pull/170/head
ariannedee 5 years ago
parent
commit
d5883068f6
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      edivorce/apps/core/static/js/main.js

+ 16
- 0
edivorce/apps/core/static/js/main.js View File

@ -44,6 +44,12 @@ $(function () {
placement:'auto right'
});
$('[data-toggle="tooltip-hover"]').tooltip({
container: 'body',
trigger: 'hover',
placement: 'auto right'
});
$('textarea').autogrow({onInitialize: true});
// All elements tagged with the following sum related data attributes
@ -190,6 +196,16 @@ $(function () {
}
});
});
$('[data-toggle=tooltip-hover]').hover(function (e) {
$('[data-toggle=tooltip]').each(function () {
// hide any open popovers when the anywhere else in the body is clicked
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.tooltip').has(e.target).length === 0) {
if (!$(e.target).hasClass('keep-tooltip-open') && !$(this).hasClass('keep-tooltip-open')) {
$(this).tooltip('hide');
}
}
});
});
// when user click textbox beside radio button, check the associated radio button
$(".other-textbox").on("click", function () {


Loading…
Cancel
Save