2

I have to use bind html inside tooltip using tooltipster jquery. But I have to bind more data inside tooltip.

How to implement scrollbar inside tooltip using tooltipster jquery? I have to tooltipster jquery and tooltipster css.

I have used code below:

$('#MainContent').tooltipster({
   trigger:"click",
   contentAsHTML: true,
   content: thtmlcnt,
   position:"right",
   autoClose:"true",
   positionTracker:true
});

Please give some solution how to implement scroll bar inside tooltip.

René Vogt
  • 43,056
  • 14
  • 77
  • 99
user2447562
  • 3,431
  • 2
  • 16
  • 15

2 Answers2

0

You can achieve this by giving the content a max-height for example

jQuery

   $('#MainContent').tooltipster({
       trigger:"click",
       contentCloning: false,
       content: $('.content').detach(),
       position:"right",
       autoClose:"true",
       positionTracker:true
   });

HTML

<div class="content" style="max-height:100px">
    //Your content here
</div>
csurapich
  • 86
  • 1
  • 9
0

Maybe this will help:

.tooltipster-base {
  max-height: 300px;
  pointer-events: all !important;
}
.tooltipster-box {
  display: inline-block !important;
  width: 100%;
  height: 100%;
  overflow: auto;
}

Reference: https://github.com/louisameline/tooltipster-scrollableTip/blob/master/tooltipster-scrollableTip.js

Mario Petrovic
  • 7,500
  • 14
  • 42
  • 62
CS_YAN
  • 41
  • 5