Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Bootstrap 4.6 Tooltip not showing in dynamically generated modal content

I'm dynamically populating a Bootstrap 4.6 modal dialog and the element with a tooltip is no longer showing the tooltip.

<div class="modal-tooltip text-center mb-2" data-toggle="tooltip" data-placement="top" data-html="true" title="<strong>Theme 1</strong><br><span class='small'>This is a longer description of the Theme</span>">
  <span class="card-text m-1 px-3 py-2 rounded" style="background-color: grey; color: white;">
    <strong><a class="text-white" href="/themes/1">Theme 1</a></strong>
  </span>
</div>

On previous advice from this website I added a handler for the loading of the modal dialog to activate the tooltips on the element:

(this is in RoR - hence on 'turbo links:load' event)

$(document).on('turbolinks:load',function() {

  // re-enable tooltips/popover on show modal
  // https://stackoverflow.com/questions/39960446/bootstrap-tooltip-doesnt-work-in-modal
  $('#my_lg_modal').on('shown.bs.modal', function() {      
    console.log("modal shown");
    $('[data-toggle="tooltip"]').tooltip()
    $('[data-toggle="popover"]').popover()
  });

});

I know the code is running when showing the dialog because the "modal shown" message is showing in console.

I also tried adding this CSS but I'm sure that's not the issue as the "title" displays as an unformatted mouseover text but not as a tooltip-formatted element.

// fix for tooltips in modal dialog
.modal-tooltip {
  z-index: 100000000; 
}

Thanks for any advice.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!