Answer the question
In order to leave comments, you need to log in
Ajax, Tooltip and Modal. How is it all to make friends with each other?
Such a problem. By clicking on the "chat" button in the modal window, a chat opens, where old messages are loaded via ajax. I want to shorten the date and time of the message and make it the same as VKontakte, i.e. part of the date is shown, the rest is through the tooltip. The problem is that tooltip doesn't want to work with messages loaded via ajax. Tell me how you can solve the problem?
After loading messages, I tried to call the function
, but it doesn't work like that. The z-index for the tooltip also did more than the modal window, but that doesn't matter, because. the tooltip just doesn't work.
$('.datetime').tooltip();
Answer the question
In order to leave comments, you need to log in
Hmm.. I don't know, like a tooltip with dynamic elements works fine jsfiddle.net/7qwjhvLw
$(function () {
$(".warp").append('<a class="showtooltip" title="Покажи меня">Что что?</a>');
$( document ).tooltip();
$('.showtooltip').tooltip();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question