I have a lot of ajax requests on my site. I use jquery hashchange plugin to integrate them.
Now, as I already noticed, after $ (window) .hashchange, I always need to restart some other plugins (e.g. fullcalendar, tooltip, etc.).
I'm trying google - on how to prevent init from repeating during ajax request. I tried this using live and it works, but the problem is that there are certain plugins that usually should not use the .live function, especially when it is based on content (e.g. fullcalendar, tooltip (page load), etc. .). I tried to solve this problem using:
$(window).on("hashchange")
I can check if the elements and RE-INIT THE PLUGINS exist (which is so dirty for me) and the problem: plugins do not work / read .
What would be the best approach when initializing plugins every time you do this in ajax? Is it possible?
PS are still starting to learn and learn more on ajax.
source
share