title: How to show an image in tooltip?
body: <p>I want to show an image in a tooltip when you have your mouse on a link. I'm using HTML, CSS and JAVASCRIPT/JQUERY. I have my image saved in a folder so I reference it from localhost.  </p>
  
  <p>I have tried to set the content of the tooltip vía JQuery:</p>
  
  <pre><code>$(document).ready(function() {
      $('#informe').tooltip("option","content","&lt;img src='images/reports/informeInversiones.PNG' /&gt;");
      $('#informe').tooltip("option","html","true");
      $('#informe').tooltip("option","animated","fade");
      $('#informe').tooltip("option","placement","bottom");
  });
  </code></pre>
  
  <p>And I have tried to set the content of the tooltip in pure HTML: </p>
  
  <pre><code>&lt;td colspan="2" id="informe" data-toggle="tooltip" title="&lt;img src='images/reports/informeInversiones.PNG'/&gt;"&gt;&lt;p&gt;&lt;i class="fas fa-download"&gt;&lt;/i&gt;&lt;a id="save"&gt; Generar Informe&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
  </code></pre>
  
  <p>An then, in JQuery: </p>
  
  <pre><code>$(document).ready(function() {
      $('#informe').tooltip("option","html","true");
      $('#informe').tooltip("option","animated","fade");
      $('#informe').tooltip("option","placement","bottom");
  });
  </code></pre>
  
  <p>I have a link which on onclick calls a JS function that downloads a PDF. I want that when you put the mouse on the link, it shows a preview (a simple image) of the PDF you're about to generate. I have tried the solutions I've seen in other questions of this page but they don't work. </p>
  
  <p>This is how I dispose the link: </p>
  
  <pre><code>&lt;td colspan="2"&gt;&lt;p&gt;&lt;i class="fas fa-download"&gt;&lt;/i&gt;&lt;a href="#" id="informe" title=""&gt;Generar Informe&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
  </code></pre>
  
  <p>And this is the JQuery: </p>
  
  <pre><code>$('#informe').tooltip({content: "&lt;img src='images/reports/informeInversiones.PNG'/&gt;"});
  </code></pre>
  
  <p>I've tried even to put simple text in <code>content:</code> but it doesn't even show a tooltip.</p>