wintercounter / Protip

A new generation jQuery Tooltip plugin
http://protip.rocks
MIT License
359 stars 38 forks source link

destroy / reinitialize #25

Closed netopolit closed 8 years ago

netopolit commented 8 years ago

Is there a way to reinitialize the plugin after loading content with ajax?

Thank you

wintercounter commented 8 years ago

There is no, because under normal circumstances you shouldn't need it. What is your detailed use case?

netopolit commented 8 years ago

I am replacing parts of the page via ajax depending on user interaction.

In this particular case I'm building a telecom website/web app. On one page user can combine certain services. Depending on which services user choose a part of the page should be dynamically rerendered to mach the users criteria. I'd like to show tooltips on that page fragment loaded via ajax.

wintercounter commented 8 years ago

It should automatically listen to DOM changes and find/initialize tooltips on the new nodes. Have you disabled observer at plugin initialization (observer: false)?

netopolit commented 8 years ago

I see it now, thanks. I haven't disabled the observer. Setting childList to true on MutationObserverInit object makes it work for me.

Thanks.