Bohdan Hdal
Bohdan Hdal

Reputation: 149

How i can reinit jquery tooltips function if ajax-call changed my code

My jquery tooltips plugin working with thumbnails. After ajax call i adding new thumbnails. But i dont know how re-init code from this example: http://osvaldas.info/blog/elegant-css-and-jquery-tooltip-responsive-mobile-friendly

I changed $( document ).ready( function(){ to function show_tooltip(){. Tooltips working fine. But after secong recalling from ajax tooltips are brokening.

How i can recall function or reset it and call again? Thanks!

Upvotes: 1

Views: 1109

Answers (2)

Bohdan Hdal
Bohdan Hdal

Reputation: 149

Problem fixed after changing .bind to .live

Upvotes: 1

charlietfl
charlietfl

Reputation: 171669

Whenever you insert new html you will need to attach the events handler for the tooltip to it. If you are inserting with AJAX, this would be done in success callback of ajax or within ajax page load event of mobile framework.

Upvotes: 0

Related Questions