You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I´m getting several elements dynamically by an Ajax-Request. Each of these elements contains a link which should open a modal when clicked. How to achieve this since dynamically generated elements are not 'recongnized' by the jquery selector?
At the moment I use this to initialize the modal: $(".modal_trigger_login").leanModal({top : 200, overlay : 0.8, closeButton: ".modal_close" });
This works for all the elements which are not generated dynamically but not for the elements which are generated dynamically.
But this only works when I click the links a second time and it also seems like it 'initializes' the leanModal on each click, because on every click it adds another lean_overlay div to the page.
Thx in advance and sorry for my english
The text was updated successfully, but these errors were encountered:
Hi,
I´m getting several elements dynamically by an Ajax-Request. Each of these elements contains a link which should open a modal when clicked. How to achieve this since dynamically generated elements are not 'recongnized' by the jquery selector?
At the moment I use this to initialize the modal:
$(".modal_trigger_login").leanModal({top : 200, overlay : 0.8, closeButton: ".modal_close" });
This works for all the elements which are not generated dynamically but not for the elements which are generated dynamically.
So I tried it with something like this:
But this only works when I click the links a second time and it also seems like it 'initializes' the leanModal on each click, because on every click it adds another lean_overlay div to the page.
Thx in advance and sorry for my english
The text was updated successfully, but these errors were encountered: