tippy js after init code example

Example: prevent getting data from data-tooltip-content tippyjs

tippy.setDefaults({
      animation: 'scale',
      animateFill: false,
      maxWidth: 240,
      duration: 0,
      arrow: false,
  });

  tippy('.js-tippy-reviews', {
      theme: 'reviews',
      animation: 'scale',
      animateFill: false,
      maxWidth: 240,
      duration: 0,
      arrow: false,
      onShow(instance) {
        instance.popper.hidden = instance.reference.dataset.tippy ? false : true;
      	instance.setContent(instance.reference.dataset.tippy);
      }
  });
 
 $(document).ready(function(){
  $("#btn-change-data").click(function()
  {
    $(".js-tippy-reviews").attr("data-tippy",$("#test-input").val());
  })
 });

Tags:

Cpp Example