Похожие чаты

Hi Javachads I have an ajax call in one of my

pages that on each call receives 3 objects.
And I use .innerHTML += <html> to add new bootstrap cards to the page with the response of that ajax call.
Now my cards are fine, but each card, upon click opens a modal that has an iframe with empty src. I have a separate JS function that gets the data-src of the card and puts it in the iframe's src.
Problem is, for the new cards to show proper modal, I need to click the card twice (first modal popup is either empty or contains the previous card's src). What behaviour is causing this? Should I change the way I add cards to the dom?

3 ответов

23 просмотра

wtf

For your actual question we probably need a codepen

Hossein- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Карта сайта