Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No tooltips are shown (since new were added) #1156

Open
WesleyWas opened this issue Jan 25, 2024 · 1 comment
Open

No tooltips are shown (since new were added) #1156

WesleyWas opened this issue Jan 25, 2024 · 1 comment

Comments

@WesleyWas
Copy link

Bug description

Since I added more tooltips on my Webflow page today, it seems like none of them are working anymore.
I'm using TippyJS to create the tooltips based on their attribute data-tippy-content.

Troubleshooting

The HTML elements seem to have the attribute attached, so the issue is not coming from here.

Screenshot 2024-01-25 at 6 38 47 in the evening

It also seems when I run the command in the console that it finds the elements:

Screenshot 2024-01-25 at 6 39 03 in the evening

There is also no console error from Tippy.

Reproduction

You can troubleshot the issue live here: https://flusk-test.webflow.io/pricing

Here's the code before the tag of my Webflow page:

<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
tippy('[data-tippy-content]', {        
 animation: 'fade',    
 duration: 400,      
 arrow: true,          
 delay: [0, 50],      
 arrowType: 'large',  
 theme: 'custom-material', // background-color
 maxWidth: 300,    
 interactive: true,
 trigger: 'hover',  
 hideOnClick: false,
})
</script>

But also tried loading after the DOM:


<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
  document.addEventListener('DOMContentLoaded', function() {
    tippy('[data-tippy-content]', {        
      animation: 'fade',    
      duration: 400,      
      arrow: true,          
      delay: [0, 50],      
      arrowType: 'large',  
      theme: 'custom-material', // background-color
      maxWidth: 300,    
      interactive: true,
      trigger: 'hover',  
      hideOnClick: false,
    });
  });
</script>
@tanin47
Copy link

tanin47 commented Apr 2, 2024

I encountered the same issue. The solution is to append to the parent instead with:

<script>tippy('[data-tippy-content]', {appendTo: 'parent'})</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants