I'm using nanoscroller.js and tiptip.js , although for my question I'm not sure specific libraries matter that much (but they may).
I have a working tool tip, I have a working scrollbar. When used seperately.
My goal is to have a working custom scrollbar inside the tooltip.
HTML:
<a class="tooltip">Open tooltip</a>
<div class="tooltip-html" style="display:none;">
<div id="main-content" class="nano">
<div class="Content">
<div class="blue">
</div>
</div>
</div>
</div>
JS:
var tip_html = $('.tooltip-html').html();
$('.tooltip').tipTip({activation: 'click', maxWidth: "230px", defaultPosition: "bottom", keepAlive: true, content: tip_html });
$("#main-content.nano").nanoScroller();
First thing I noticed about the above: With this arrangement the nanoscroller was only applied to the first set of html, not the set that is in the tooltip.
So I then applied the scrollbar first before grabbing the html and adding it to the tooltip, this applied the scrollbar to the tooltip but it wasn't functional.
Tried a lot of different approaches here (applying the scrollbar to every id that matched, different order of when to call which, etc), and I'm definitely stuck. Any help is appreciated, thanks!